how to revert git changes after merge and commit
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.
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.
上一篇: 合并分支掌握所有的变化?
下一篇: 如何在合并和提交后恢复git更改