簡體   English   中英

我在git的master分支中搞砸了,創建了一個新分支,如何使該分支成為新的master?

[英]I messed up in my master branch in git, created a new branch, how to make this branch new master?

所以基本上看起來像這樣:

我想放棄調用的提交,但它在master分支中:

6e228be
Main.storyboard screen fix.

並使Xcode7分支成為新的master,或者合並而不進行上述提交。 我該怎么做 ?

您應該能夠檢出master並重置提示提交,然后快速前進合並xcode7分支。

git checkout master
git reset --hard HEAD~
git merge Xcode7

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM