Git Learning (3)

Source: Internet
Author: User

Continue to make the following modifications to Readme.txt:

is a distributed version control system.Git is free software distributed under the GPL.

Then commit to the repository using git add and git commit.
Files are modified many times, Git records each commit, when the file is scrambled or the file is mistakenly deleted, you can recover from a recent commit.
Use the command git log to view file history modification records. Displays the commit log from the nearest to the farthest,
The resulting log information, the number after commit is the version number of the Commit,

Version fallback:
Git, with the head of the current version, which corresponds to a version number, the previous version is head^, the last version is head^^, the 20th version is head~20.
Use the command git reset to fallback to the previous version:
git reset--hard head^
With Git log, you can't see the version of append GPL,

To return to the append GPL version,
1, you can use
Git reset--hard version number
The version number needs only the first few of the full version number,
What if I forget the version number?
2, you can use
Git reflog
Record the information for each command, with a version number.

Git Learning (3)

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.