git commit record and see so git commands

 

Check submitted records

git log --reflog

 

git will fall back to a version of a single file

1. Go to the directory where a.jsp, a.jsp view a.jsp changes recorded by git log

2. Locate the version number that you want rolled back: for example fcd2093

By git reset fcd2093 a.jsp first edition library and staging area to fall back to the file version history fcd2093

3. History and then staging area version of the file (fcd2093) covering the corresponding document workspace, to a workspace, unity between the staging area and the repository of the three.

git checkout --a.jsp

[Note] git reset [options] [version] [rollback objects] command, when the object is a fallback option when a file can not be hard

Source: https://www.cnblogs.com/leiblog/p/10922606.html

Guess you like

Origin www.cnblogs.com/shaoyang0123/p/11846727.html