Git: First Steps
Initializing a Repository in an Existing Directory
If you’re starting to track an existing project in Git, you need to go to the project’s directory and type:
$ git init
Your Identity
The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.comYour Identity
Your Editor
Now that your identity is set up, you can configure the default text editor that will be used when Git needs you to type in a message. If not configured, Git uses your system’s default editor, which is system dependant.
If you want to use a different text editor, such as Emacs, you can do the following:
$ git config --global core.editor nano
How to colorize output of git?
$ git config --global color.ui auto
$ nano .git/config
Now, include this line as last line into [core]:
pager = less -R
