-2

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.

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
  • 2
    Does this answer your question? [Undo git pull, how to bring repos to old state](https://stackoverflow.com/questions/1223354/undo-git-pull-how-to-bring-repos-to-old-state) – starball May 10 '23 at 07:14

2 Answers2

0
git rebase --abort

This will take you before the pull stage.

naggarwal11
  • 122
  • 1
  • 14
-2

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 ;)

colin
  • 761
  • 1
  • 11
  • 24
  • 1
    `git reset` will let you do anything you want to the current branch state. Regardless, OP seems to be asking for GUI help with VS Code. – Carl Norum May 10 '23 at 17:00