这就是我在我所谓的稳定分支上所做的事情......
% git rebase master
First, rewinding head to replay your work on top of it...
Fast-forwarded alpha-0.3.0 to master.
% git status
# On branch alpha-0.3.0
# Your branch is ahead of 'origin/alpha-0.3.0' by 53 commits.
#
nothing to commit (working directory clean)
% git push
Fetching remote heads...
refs/
refs/heads/
refs/tags/
refs/remotes/
'refs/heads/master': up-to-date
updating 'refs/heads/alpha-0.3.0'
from cc4b63bebb6e6dd04407f8788938244b78c50285
to 83c9191dea88d146400853af5eb7555f252001b0
done
'refs/heads/unstable': up-to-date
Updating remote server info
Run Code Online (Sandbox Code Playgroud)
这是我后来意识到的一个错误.我想撤消整个过程,并将alpha-0.3.0分支恢复到原来的状态.
我该怎么办?
我不小心做了push --force错误的回购(太多的termminals打开),有效地将master分支重新设置回早期的提交.
看看我的构建系统,我可以看到提交用于指向XYZ,但是我没有本地提交,因为我最近没有进行过pull或fetch.回购在Github,我可以在Github中导航查看提交,所以我知道它在那里.
我怎样才能下拉提交,这样我就可以重新设置master回正确的提交而不必打扰推动该更改的开发人员?