[英]Accidentally branched off of the wrong branch, and when I want to merge into the master I have to merge both branches
[英]<GIT> I have branched off a branch and want to push my changes. Do I push changes to the original branch or merge the two branches?
我有分支ticket-123/fancy_feature,我從分支ticket-123/fancy_feature_styles 開始處理一些樣式。
在我對分支ticket-123/fancy_feature_styles 進行更改后,我是推送到分支ticket-123/fancy_feature 還是與它合並?
除了介紹 git 之外的任何東西都是新手,並且想要學習最佳實踐,歡迎任何反饋或想法
在最簡單的情況下,只需要合並即可。
在完成對ticket-123/fancy_feature_styles
的提交后:
git checkout ticket-123/fancy_feature
git merge ticket-123/fancy_feature_styles
如果您正在為多個開發人員處理相同代碼的大型項目做出貢獻,您可能會將ticket-123/fancy_feature_styles
推送到遠程分支,然后打開拉取請求將其合並到ticket-123/fancy_feature
中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.