First-time Git setup

From Geos-chem
Revision as of 14:40, 19 June 2019 by Bmy (Talk | contribs) (Created page with "== First-time Git setup === Before using Git for the first time, you need to set up your <tt>~/.gitconfig</tt> file. This will set some global parameters, such as your name...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

First-time Git setup =

Before using Git for the first time, you need to set up your ~/.gitconfig file. This will set some global parameters, such as your name and email, and the external editor that you wish to use with Git.

By editing the .gitconfig file

Open a text editor and then cut & paste the text from this sample .gitconfig file.

[user]
        name = Your Name
        email = you@yourdomain.example.com
 
[core]
        editor = emacs

There are other settings you can add, but these are the absolute minimum that you need. Be sure to change your name and email accordingly, this is how Git will know who you are!

When you are done editing the file, save it as ~/.gitconfig.

Or by using the git config command

If you do not wish to manually edit the the ~/.gitconfig file, you can define the same settings by using the git config --global command:

git config --global user.name "Your Name"
git config --global user.email you@yourdomain.example.com
git config --global core.editor emacs