Configure your Git repo
After installing Git and setting up our first repository, and efore starting our journey with Git, we need to do basic configurations.
in order to configure email ,use this command : git config user.email "email here"
If you are inside a Git repository, this will set the email only for this repository, in order to make that email global (for all Git repositories), you can use --global option, like this : git config --global user.email "email here"
in order to configure your username, you can use this command : git config user.name "name here"
Similarly to the email, you can set this username globally with --global option
You can choose your preferred Git text editor, where you can edit text while merging and rebasing (we will see these notions later). This is especially useful if you are not familiar with Vim, the text editor that comes by default with Git.
In my case, I prefer to use Sublime Text 3, so the command I used was :
You can use this command :
This command will start a local store (think of it as a file) for you on your computer, in the next time you use git push (to push your commits to the server for example), Git will ask you for your credentials and then will store them in this file.
Beware that these credentials are stored on your file system as plain text, so it's up to you to decide whether you want to use this or not.
This is generally the configuration I use for my projects, hope this helps !
Happy learning !