簡體   English   中英

<git>我已經分支了一個分支並想要推送我的更改。 我是將更改推送到原始分支還是合並兩個分支?</git>

[英]<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.

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