Next, set your default username and e-mail address so that Git can identify the person committing changes.
This setup only needs to be done once.
The Git console configuration is saved in the
.gitconfig file in the user’s home directory. You can manually edit the file, but we will use the git config command in this tutorial.
$ git config --global user.name "" $ git config --global user.email ""
Set the Git output color.
$ git config --global color.ui auto
You can also set aliases for Git commands. For instance, you can abbreviate
co to execute the command.
$ git config --global alias.co checkout
If you use Console (Git Bash) on Windows, a file name containing non-ASCII characters will be displayed in a form like
\346\226\260\350\246…, We can configure it to allow the file to display
the file name as it is by doing the following:
$ git config --global core.quotepath off
If you use Console on Windows, you can only use ASCII characters.
Accordingly, to include multi-byte characters in a commit message, you must set an external editor and not use the
External editors should be compatible with the character code UTF-8 and line feed code LF.
git config --global core.editor "\"[path of the editor you use]\"" git config --global core.editor "\"[path of the editor you use]\""
Setup is complete! Now we can get to work.