Initialize
Use Git to manage your file version
Git config
When you push your code to the repositoy, and it will show the author's name and email
on the git commit.
All of the author's name and email
are setting on the user.name
and user.email
variable
You can use the following command to update the author's name and email
$ git config --global user.name "KJ"
$ git config --global user.email kj@kejyun.com
Initialize git
If you want to use git to control your files version. You can run the following command to initialize git on your folder.
git init
Initialize git and specify the first branch name
The default branch name is master
on the git. But it updates to the main
branch on the latest git version. So if you are still using the old version of git. It will use the master
branch as the first branch while you initial the git.
If you want to change the first branch name, you can use the -b
argument to specify the first branch name.
git init -b main