[英]My git master branch seems to have all the files/changes made to a separate branch
[英]Creating a git Branch after changes have been made to master
我開始在master中工作 - 稍后進行了許多更改(沒有提交)我意識到這項工作應該在一個單獨的分支中完成。
我可以使用當前更改創建新分支,然后將主服務器中的更改丟棄回其原始狀態嗎?
謝謝
我想到了。
在主人身上:
git branch [new-branch]
git checkout [new-branch]
...繼續編輯 - 就我而言,我承諾了......
git add .
git commit -am 'updates'
切換回主人
git checkout master
在我開始做出所有改變之前,分支處於原始狀態......
希望這有助於其他人!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.