Code has been added to clipboard!

How to Start Using Git and Set up Your Username Data

Reading time 4 min
Published Jan 3, 2016
Updated Oct 3, 2019

Is your chosen Git version well installed on your Windows, Mac OS or Linux system? If so, it is time to move on and start Git setup. The first step to do so is by setting an account of the user who is going to be in charge of a specific Git account.

It is a common practice among systems, and Git setup is no exception. You will have to choose a username and indicate an email which you will use to connect to the system for the first time and later on at Git login.

Don't worry, all this information is easy to change. Git username and email that you choose during Git setup can be seen and changed in the settings of Git, also known as Git config. What is more, once you learn how to manage Git config section, you will be able to see and manage all the possible options there.

Git setup begins with Git username and email, but there is more to do. For example, you will also be able to set a text editor of your choice. That is the very beginning of setting up your work environment at Git by using Git setup. All these actions are covered in the tutorial below, so start reading now.

Setup Git: Main Tips

  • The first thing you should do after Git installation is to create Git login by setting values for your Git config username and email.
  • The personal details you will enter to the system will be used in revising the information you change - Git uses it for commits.
  • Git has a configuration tool where you can check or change your user information, also start customizing your Git environment.

Setting up Your Personal Information

After the installation, there are a couple of things you must do on any operating system, not exceptionally Git - to set up your username and email address. Your username will be often referred to as Git config username and your email as Git config email.

This information is essential to identify the user which makes the changes or creates versions of the information. Git config username and email will be used with so-called commits or revisions which are individual changes to a file.

In order to set up your git username, you might want to type this command line into the console, only of course, with your own username and email address:

$ git config --global user.name "My Name"
$ git config --global user.email myemail@example.com

How to Access Git Settings by One Code Line

You might also find yourself wondering how to check settings.

It's easy: if you want to see your Git settings information, just run the command below:

Git config --list

This command shows you the settings information.

Git config is a configuration (or settings) section where you can see and change your user information as well as to customize your work environment. One of such changes that you should do is to configure the default text editor. Git will use it to send messages to you. This step is optional, but if you choose not to set, Git will use the default system editor.

If you would like to use another text editor (for example Geany, Emacs, etc.) for Git, you can set it by typing:

git config --global core.editor geany

If you want, you can also check specific key values. For this, type a chosen config key. For example, let's say we want to find the Git username that you have chosen:

git config user.name

You might find it useful to type in git config to the console. By this command, you will be able to see all the possible configuration options.

Git Setup: Summary

  • Starting using Git requires you to set a username and an email which in the system are names Git config username and Git config email.
  • The username and email will be used for it login as well as to create commits and identify changes in the files you will later make.
  • You can see and change Git setup information in the Git config section. All the other configuration options can be found there.
Learn Git
Introduction
Installation
Setup
Branch
Repository Basics
Server
Workflow Cheat Sheet
Save Changes
Move Files
Undo Changes
Examine Repository