當我最初分岔項目,並設置我的環境,我有這個。git推到分叉prj;拉請求到一個父分支
> git branch -a
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/upstream/master
我沒有對上游項目的「推送」權限。我必須 從我的叉子發送拉請求。
一個星期後,創建了一個新的分支,用於對上游進行特定增強的工作。 該團隊可能會在這個分支工作數週。
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/upstream/new-project-feature
remotes/upstream/master
什麼是適當的方式來設置和提交代碼到這個分支? 這就是我所做的。這是正確的做法嗎?
git branch new-project-feature
git checkout new-project-feature
git rebase upstream/new-project-feature
.. code changes
.. commit
git push origin HEAD:new-project-feature
.. go to github and send the pull request.
如何父項目知道合併拉請求其 新項目的特性分支?