Git-如何回滚 [英] Git - how to rollback
本文介绍了Git-如何回滚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道之前已经问过这个问题,但是尽管给出的答案 git reset --hard HEAD〜1
有效,但是由于服务器在前面,所以我无法将其推送到服务器.拉显然使我回到原处.
I know this question has been asked before but although the given answer git reset --hard HEAD~1
works, I cannot push it to the server since the server is ahead. Pulling obviously puts me right back where I was.
如何重置服务器?
推荐答案
您要强制进行推送,只有在确定更改后才能使用.
you want to force a push, only use this if you are certain of the change.
git push origin --force
这篇关于Git-如何回滚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文