由於我面對這個困難很多,我想知道git是否有一個妄想。如何從Git中的特性分支合併上游/主機到原始/主機?
- 我有一個上游回購。
- 我已經僞裝了,並命名爲
origin
。 - 我有一個
master
分支。 - 我有一個分支叫做
feature_1
。
我在feature_1
分支在開發過程中。我下面這些步驟時,我想變基它:
$ git checkout master
$ git fetch upstream // To see is there any change although pull works as well
$ git merge upstream/master // in case there is a change
$ git push origin/master
$ git checkout feature_1
$ git rebase master
所以,我知道我能夠從feature_1分支上游獲取,但我不知道我能夠從feature_1分支合併upstream/master
爲origin/master
,然後變基它(沒有離開feature_1分支)?
任何幫助,將不勝感激。謝謝。
謝謝Tim,'Remote'是公司的回購。 「Origin」是我爲了發送PR而分叉的。 – Hesam
我再次不知道'git push origin/master'是什麼意思,但我不認爲這會改變我的答案的大部分。 –
啊,你說得對。雖然我需要它來記錄更改(用於創建新分支),但這並不是必需的。謝謝。 – Hesam