反向拉取来自VS Code的更改。

huangapple go评论41阅读模式
英文:

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] 是之前提交的哈希值。

注意:不要忘记末尾的 . 反向拉取来自VS Code的更改。

英文:

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 反向拉取来自VS Code的更改。

huangapple
  • 本文由 发表于 2023年5月10日 15:05:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215742.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定