[Git] A discussion on Git on Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.