2015-08-17 48 views
0

如果我在git中有多個功能分支,有沒有辦法在合併一個分支上游之前將它們「合併 - 擠壓」在一起?是否有可能將多個分支拼湊成一個分支?

            master 
                /
feature/user-groups  \       /
feature/web-security  > feature/user-security /
bugfix/country-codes /
bugfix/trademark-year/

回答

1

選擇現有的分支之一,說功能/用戶組,和叉從一個新的分支:

git checkout feature/user-groups 
git checkout -b feature/user-security 

現在,合併其他三個分支:

git merge feature/web-security bugfix/country-codes bugfix/trademark-year 

這會在功能/用戶安全性分支上產生一個提交,其父母通向四個原始分支。

+0

謝謝,這可能是我在找的! – blakev

相關問題