樱桃采摘为空时如何“拉请求”特定的提交?

时间:2019-02-10 17:18:31

标签: git

我遇到的问题与姐妹问题How to "pull request" a specific commit?中所述的完全相同。

我在the answer上尝试过a fork of simplemonitor

D:\Seafile\dev\dev-perso\simplemonitor>git checkout -b wsw70-network-1
Switched to a new branch 'wsw70-network-1'

D:\Seafile\dev\dev-perso\simplemonitor>git cherry-pick ee1f3b1c575e79ce831102463c8aa303c0ae825e
On branch wsw70-network-1
You are currently cherry-picking commit ee1f3b1.

Untracked files:
        monitor-internet.ini
        monitor-srv.ini
        monitors-internet.ini
        monitors-srv.ini

nothing added to commit but untracked files present
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git reset'

D:\Seafile\dev\dev-perso\simplemonitor>git push -u origin wsw70-network-1
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'wsw70-network-1' on GitHub by visiting:
remote:      https://github.com/wsw70/simplemonitor/pull/new/wsw70-network-1
remote:
To https://github.com/wsw70/simplemonitor
 * [new branch]      wsw70-network-1 -> wsw70-network-1
Branch wsw70-network-1 set up to track remote branch wsw70-network-1 from origin.

The previous cherry-pick is now empty, possibly due to conflict resolution.是什么意思?

1 个答案:

答案 0 :(得分:0)

@Rierry的评论指向正确的解决方案。

我从HEAD分支,而不是更早开始,只是挑选相关的提交。在我的情况下,具体是:

D:\Seafile\dev\dev-perso\simplemonitor>git checkout 75950ea4ff8a1a809da4a0c26b068afc0f9eea5f -b wsw70-2
Switched to a new branch 'wsw70-2'

D:\Seafile\dev\dev-perso\simplemonitor>git cherry-pick ee1f3b1c575e79ce831102463c8aa303c0ae825e
[wsw70-2 f696467] fallback on IPv4 when IPv6 not available
 Date: Sun Feb 10 00:45:00 2019 +0100
 1 file changed, 6 insertions(+), 2 deletions(-)

D:\Seafile\dev\dev-perso\simplemonitor>git push -u origin wsw70-2
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 447 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote:
remote: Create a pull request for 'wsw70-2' on GitHub by visiting:
remote:      https://github.com/wsw70/simplemonitor/pull/new/wsw70-2
remote:
To https://github.com/wsw70/simplemonitor
 * [new branch]      wsw70-2 -> wsw70-2
Branch wsw70-2 set up to track remote branch wsw70-2 from origin.

然后创建了PR,并接受它:)