將拉取請求克隆到本地存盤庫的方式是什么?https://github.com/RoboSherlock/roboSherlock/pull/215 這是我想合并到我的分支或本地的拉取請求。我在這里搜索了一些問題,但看起來有所不同,我想將這些拉取請求合并到我的倉庫中。這個拉取請求在 master 分支中,但我必須在 noetic 分支中合并。
uj5u.com熱心網友回復:
關鍵事實:拉取請求分支中的最后一次提交是bb7efd3.
因此,執行此操作的直接方法是進入noetic分支并合并bb7efd3到其中。您將需要解決一個小的合并沖突,然后一切就緒。
我想如果我想通過拉取請求來做到這一點,我會進入noetic,將原始拉取請求分支的兩個提交重新系結到它上面,將其稱為一個新分支,推送我的新分支,然后創建拉取請求。在這里,我將向您展示:
git switch noetic
git rebase --onto noetic bb7efd3~2 bb7efd3
# ... resolve merge conflict and finish rebase ...
# ... you are now on a detached head ...
git switch -c newbranch
正如你所看到的,結果正是你想要的拓撲——一個新的分支noetic看起來像舊的拉取請求分支:
% git log --oneline -n 3 mybranch
5242afa (HEAD -> mybranch) Fix wrong constructor name
3ef17e6 RegionFilter with markers
84cc713 (origin/noetic, noetic) changed default demo pipeline. no tf lookups anymore to avoid tf lookup errors in the tutorials
所以現在你可以newbranch用普通的方式推送和形成拉取請求了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/400645.html
上一篇:ssl.SSLCertVerificationError當使用django-channels連接到herokuredis時
