RNA*_*RNA 2 git github cherry-pick pull-request git-cherry-pick
是否可以从github上挑选所有待处理的PR?
假设我有来自4个不同的分支存储库的4个PR等待审核。我需要将所有这些都应用于最新的源代码。
PR#65 Do something
PR#61 Notify this
PR#55 Fix that
PR#42 Show there
Run Code Online (Sandbox Code Playgroud)
我知道我可以将git remote add所有存储库一一挑选。但是,我相信会有一种更容易/更快捷的方式来挑选所有尚不知道的待处理的拉取请求;)
提前致谢
将pr / *添加到.git / config
test_repo$ git remote -v
test_repo http://github/testA.git (fetch)
test_repo http://github/testA.git (push)
Run Code Online (Sandbox Code Playgroud)
vim .git/config
Run Code Online (Sandbox Code Playgroud)
[remote "test_repo"]fetch = +refs/pull/*/head:refs/remotes/test_repo/pr/*
Run Code Online (Sandbox Code Playgroud)
所以看起来像
[remote "test_repo"]
url = http://github/testA.git
fetch = +refs/heads/*:refs/remotes/test_repo/*
fetch = +refs/pull/*/head:refs/remotes/test_repo/pr/* <-- this line was added
Run Code Online (Sandbox Code Playgroud)
$ git fetch test_repo
* [new ref] refs/pull/16/head -> test_repo/pr/16
* [new ref] refs/pull/17/head -> test_repo/pr/17
* [new ref] refs/pull/18/head -> test_repo/pr/18
* [new ref] refs/pull/19/head -> test_repo/pr/19
Run Code Online (Sandbox Code Playgroud)
git cherry-pick test_repo/pr/xx
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2968 次 |
| 最近记录: |