What I learned this time isVersion rollback
Basic commands:
- View submitted git logs
- Version rollback git Reset
- View git reflog for each command
Procedure:
- Commit scripts to readme.txt and submit them to the GIT repository.
,
Readme.txt has three versions in git:
The order of submission time is as follows:
First: wrote a readme.txt
Second: Add distrubuted
Third: add difficulties
- If there are too many versions, you can only view the history by using the GIT log command.
A major string after commit consisting of digits and letters is the version number.
- In git, head indicates the current version, head ^ indicates the previous version, head ^ indicates the previous version, and head ^ indicates the previous version ~ 10.
Roll back to the previous version of git reset -- hard head ^
Return to the third version: add difficulties
Git reset -- hard a1ac5da5b345f2f0eada06b534bde4108c1b73c4 (the version number can be left blank, just the first few digits)