取消“git推动”这是我在我的应该是稳定的分支.。% git rebase masterFirst, 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 pushFetching 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-dateUpdating remote server info这是一个错误,我后来意识到。我想撤销整个过程,并将alpha-0.3.0分支恢复到原来的状态。我该怎么办?
3 回答
千巷猫影
TA贡献1829条经验 获得超7个赞
git push -f origin last_known_good_commit:branch_name
git push -f origin cc4b63bebb6:alpha-0.3.0
receive.denyNonFastForwards
[remote rejected]
.
git push origin :alpha-0.3.0 git push origin cc4b63bebb6:refs/heads/alpha-0.3.0
receive.denyDeletes
git update-ref refs/heads/alpha-0.3.0 cc4b63bebb6 83c9191dea8
扬帆大鱼
TA贡献1799条经验 获得超9个赞
git checkout alpha-0.3.0 git reset --hard cc4b63bebb6 git push origin +alpha-0.3.0
慕村225694
TA贡献1880条经验 获得超4个赞
git revert
prompt> git revert 35f6af6f77f116ef922e3d75bc80a4a466f92650 [master 71738a9] Revert "Issue #482 - Fixed bug." 4 files changed, 30 insertions(+), 42 deletions(-) prompt> git status # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # nothing to commit (working directory clean) prompt>
- 3 回答
- 0 关注
- 310 浏览
添加回答
举报
0/150
提交
取消