-1

I am new to git and don't have too much idea about how to use git.

I have committed my branch and pull it, then I changed to some other branch and again git pull it and then merge with my branch. Now I want to remove all the merged data and want to go till where I have committed my code.

I really need help. Thanks in advance.

  • 2
    Possible duplicate of [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) – phd Jan 22 '18 at 19:35

1 Answers1

0

Reset Your prev commit. git reset --hard HEAD~1

if you want to overwrite it on the server: git push -f Be careful with force push only do it when you are 100% sure your code is working.

Peter
  • 1,586
  • 13
  • 25