Git detailed tutorial, starting from 0, master

Source: Internet
Author: User

First step: Install Git

Step two: After the installation is complete, start playing git, initialize


Git init file initializes the current directory as a Git repository and generates a. Git repository file

Git add file joins Git's staging area with a commit command to commit to the repository



add to Repository staging area Stage,commit to master Main branch, head is a pointer to master branch

Step three: Submit the file to the repository and view the status under the current warehouse path through status


At this point, a simple git process operation is over.


And look at some other operations.

Git Status View file modification status in the current repository

Git log can watch all the actions


Checkout can undo the current no add after the file modification, if the file revocation after the add, you must reset to the previous version, and then checkout undo the file modification


git rm command to delete files from the repository


Git checkout-b Create a branch and develop it on a branch and then merge it into the master Master branch of the operation


Branch merge conflicts, like SVN, first modify the conflict, re-add, and then commit



Clone a warehouse from a warehouse path


Reflog view git's command execution record















Git detailed tutorial, starting from 0, master

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.