Git switches the branch code to a certain commit submission
The current branch switches to a certain commit:
git chekcout <commit_id>
Switch to a certain commit submission, and create a new branch with that commit submission:
git branch <new-branch-name> <commit_id>
Discard all code file modifications:
git checkout .
git reset undoes all modifications of the current branch and restores to the clean branch before the last modification Hard followed by: git clean -fd https://blog.csdn.net/zhangphil/article/details/90270695 git rollback code warehouse version_git rollback to the previous version will affect the local code_zhangphil's blog-CSDN blog Git rollback code version_git rollback to the previous version will affect the local code https://blog.csdn.net/zhangphil/article/details/125624513