我有这个:
branch-1 a--b--c--d
我需要这个:
branch-1 a--c--d
branch-2 b
我试过这个:
$git checkout -b branch-2
$git cherry-pick <SHA-1 b>
但我得到了这个:
error: could not apply <SHA-1 b>... [comment]
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
所以我做$git status
了并得到了Unmerged paths ... both modified: .gitignore
. 在再次尝试之前,我git add
ed 和git commit
ted 再次得到相同的错误消息。
如何将特定提交移至新分支?