1, basic settings, including user name, mailbox, editing tools, viewing settings, help, etc.
$ git config--global user.name "John Doe" $ git config--global user.email [email protected]$ git config--global core.edi Tor vim$ git config--list$ git help xxx (e.g. config)
2. Create your first git library
$ git init
Local git maintenance consists of three trees, working dir--add--> Index--commit--> HEAD
This is OK, if you want to start the first time to the existing file version management, then enter the specified file such as *.c
$ git add *.c //Put cache index$ git commit-m ' initial project version '//cache submit to head
$ GIT push origin master//The head of the local repository commits to the remote repository
$ git Remote add origin <server>//Specify the submitted warehouse server
3. Copy HTTP or other remote libraries to a local
$ git clone https://github.com/libgit2/libgit2$ git clone https://github.com/libgit2/libgit2 libdir
protocol, but could git://
also see or Exampale uses https://
[email protected]:path/to/repo.git
[Git] A discussion on Git on Mac