Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

Undo git pull, how to bring repos to old state

Asked by Aswini Lobo Jul 1, 2021 1.7K views 1 answer
Share

About this question

 Is there any way to revert or undo git pull so that my source/repos will come to the old state that was before doing git pull? I want to do this because it merged some files which I didn't want to do so but only merge other remaining files. So, I want to get those files back, is that possible? 

I want to undo git merge for clarification. After some research, I did this

git reflog
bb3139b... HEAD@{0}: pull : Fast forward
01b34fa... HEAD@{1}: clone: from ...name...

Now, what should I do? Doing git reset --hard is OK? I don't want to screw it again, so asking for detailed steps?

Your answer

1 Answer

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.