Git force sync branches

Forcing sync branches is not recommended!

  • Force the remote branch be the same as the local branch:
git push -f origin master
  • Force the local branch be the same as the remote branch:
git reset --hard origin/master
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,180评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,508评论 0 23
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,961评论 0 0
  • JJ林俊杰演唱会终于在天津举行了,提前一天从老家保定赶回来,想着陪着媳妇过一个不一样的十一。 第一次参加,心里还是...
    霍亮_cefe阅读 2,823评论 2 0
  • 想提一壶酒 去看你 石头一样坐在你对面 不放过你脸上任何细微的表情 只为弄清后四十回到底讲了什么 还想和你聊聊怡红...
    蜗牛在路上遇到了黄鹂阅读 1,355评论 0 1

友情链接更多精彩内容