英文:
Reverse a pull from VS Code
问题
我错误地从错误的分支拉取了代码。如何在VSCODE中还原它?
我需要将更改还原到在拉取之前的状态。
英文:
I have mistakenly taken the pull from wrong branch. How to revert it from VSCODE ?
I need to revert the changes to the previous state which it was before the pull.
答案1
得分: 0
取消 Git 重置 -- 中止
这将使你回到拉取阶段之前。
英文:
git rebase --abort
This will take you before the pull stage.
答案2
得分: -2
抱歉,根据我的知识,Git没有内置功能可以撤销一个拉取(pull)操作。
但是,你可以尝试以下操作:
git checkout [revision] .
其中 [revision]
是之前提交的哈希值。
注意:不要忘记末尾的 .
英文:
Unfortunately, as of my knowledge, there isn't any built-in feature that lets you revert a pull.
Although, you could do something like
git checkout [revision] .
where [revision]
is the hash of the commit you had previously.
Note: don't forget the .
at the end
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论