Git version control management Part I: Common commands

Source: Internet
Author: User

A. Some concepts of git:http://guibin.iteye.com/blog/1014369

Two. Common commands in Git

Git help-view common commands

Git help-a-View a list of commands

git help [command]-View specific commands

1.git init-Create an empty repository

2.git Add./-Adds all the files in the current directory to the repository

3.git status -View the content that has been added to the repository and will be submitted            

4.git Show eca904303e7de147b1cd5136f149542a4b28afa0-View the details of the submission code

5.git commit-m "xxx function completed"-Submit the newly added file

6.git Commit index.html -Commit the modified file                          

7.git Log -View submissions                            

8.git diff eca904303e7de147b1cd5136f149542a4b28afa0 \c3e337f1e64f7b6c9c6758d503f42adca876d654

                                -View submission differences. The first one is the old commit code, the second is the new commit code

9.git show-branch--more=10                 -View the 10 most recently submitted information

10.git RM thrid.html-delete a file                        

11.git MV second.html forth.html-Renaming a file

git clone public_html my_website-Clone a new repository locally

Git version control management Part I: Common commands

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.