Directly execute the following command in shell:
Git config -- global user. Name "Tsung"
Git config-global user. Email "username@email.com"
Git config -- Global color. Diff auto # git diff must be highlighted
Git config -- Global color. Status auto # git status must be highlighted
Git config -- Global color. Branch auto
Future: these settings will be in ~ User/To generate. gitconfig, so we can edit this file directly, as shown below:
----------------------------------------------------------------
[Color]
Diff = auto
Status = auto
Branch = auto
[User]
Name = Tsung
Email = username@email.com
------------------------------------------------------------------
Shortcut Configuration:
$ Git config -- Global alias. St status
$ Git config -- Global alias. CI commit
$ Git config -- Global alias. df diff
$ Git config -- Global alias. CO checkout
$ Git config -- Global alias.br Branch
For temporary settings, do not add the -- Global parameter, such
$ Git config user. Name "2"
$ Git config user. Email "2@g.cn"