撤消git pull --rebase [英] Undoing a git pull --rebase

查看:131
本文介绍了撤消git pull --rebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我是git的新手,我需要撤消拉,任何人都可以帮忙吗?!?所以我所做的是...


  1. git commit

  2. git存储
  3. >
  4. git pull --rebase

  5. git存储流行

这造成了一系列的冲突,并出现了一些问题。现在做'混帐藏匿清单'显示,我的藏匿处仍然存在。是否有可能在执行git commit之后将我的回购回复到该点。所以有效的回购只包含我所做的更改,并没有新的服务器?

解决方案

using git reflog 你会看到HEAD指向过去的提交列表

使用

  git checkout -b after-commit HEAD @ {1}#或者您想要恢复的提交

你在这个确切的位置创建一个新的分支并检查出来

Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is...

  1. git commit
  2. git stash
  3. git pull --rebase
  4. git stash pop

this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash is still there. Is it possible to revert my repo back to the point just after doing git commit. So effectively my repo only contains only changes I have made and nothing new from the server?

解决方案

using git reflog you will see a list of commits HEAD pointed to in the past

using

git checkout -b after-commit HEAD@{1} # or the commit you want to recover

you create a new branch at that precise position and check it out

这篇关于撤消git pull --rebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆