Home > Blockchain >  Is there any way to "git reset --hard" in the VSCode app?
Is there any way to "git reset --hard" in the VSCode app?

Time:10-22

Is there any way to run git reset commands using the VSCode graphic interface? It seems like every other git operation is available. If not, then how can a GUI user resolve rewritten history on the remote?

If I pull a branch, and then someone else in the world runs git commit amend && git push --force to my branch so that the hash of the HEAD has changed, does VSCode's git interface offer any way of resolving that? From a terminal I would normally just git fetch && git reset --hard origin/my-branch, but I work with people not comfortable on the command line. Is there any way to express to VSCode "abandon what I have without reservation and set my code to the latest remote"

enter image description here

After you select this command, it will display a list of commits to reset to, and then after choosing a commit, it will ask you how you want to reset (i.e. hard, soft, etc).

Gitlens also adds quite a lot more to the "git experience" for Visual Studio Code.

  • Related