我通过此命令将本地主服务器重置为提交:
git reset --hard e3f1e37
Run Code Online (Sandbox Code Playgroud)
当我输入$ git status命令时,终端说:
# On branch master
# Your branch is behind 'origin/master' by 7 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
#
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)
由于我也要重置原点/标题,我结帐到origin/master:
$ git checkout origin/master
Note: checking out 'origin/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without …Run Code Online (Sandbox Code Playgroud)