git Remote code library rollback (webstorm )
1. Scene
Added a file "file-for-test.js" to git 's control
Three modifications were made, three commits were made, and a push was made
git log results such as:
The contents of the "file-for-test.js" file are as follows:
Now hopefully, roll back the "file-for-test.js" fileunder the Remote Code library to theversion of "//lyn test1"
2. Operation Step 2.1. "Version Control"--"Log"
2.2. Right-click the//lyn test1"line,"Reset Current Branch ... "
2.3. Select " Hard", click"Reset"
At this point git log results such as:
2.4. Key steps: Set upForce Push2.4.1. "VCS"--"Git"--"Push"
2.4.2. "Configure"
2.4.3. Tick "Allow force push","OK "
2.5. "VCS"--"Git"--"Push"
2.6. Tick "Push Tags", select"Current Branch ", select"Force Push"
2.7. "Force Push"
2.8. OK
git log results such as:
The contents of the "file-for-test.js" file are as follows:
GITF Remote Code library rollback (webstorm)