【发布时间】:2011-10-27 16:07:54
【问题描述】:
我正在尝试从 master 中挑选一个提交并将其放入当前的生产分支。但是,当我执行git cherry-pick <SHA-hash> 时,我只会收到以下消息:
# On branch prod_20110801
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
# site/test-result/
nothing added to commit but untracked files present (use "git add" to track)
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'
注意:我尝试过重置和重置 --hard HEAD^,但似乎都没有改变任何东西。
我很困惑为什么这对我不起作用。
任何有关如何解决此问题的见解、建议或想法都会有所帮助~!
【问题讨论】:
-
当我不小心尝试挑选错误的提交时,这发生在我身上。使用 gitk 时有时会发生。
标签: git branching-and-merging cherry-pick