Git:樱桃选择工作副本,无需提交 [英] Git: Cherry-Pick to working copy without commit
本文介绍了Git:樱桃选择工作副本,无需提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个分支,我保持某些提交,我想不时适用于我的工作副本。最初我尝试了樱桃采摘,但我不想在以后的目标分支中提交。
I have several branches where I keep certain commits that I want to apply to my working copy every now and then. Initially I tried cherry-picking but I do not want to have the commit in the target branch later.
所以我做了 cherry-pick
+ reset HEAD〜1 --soft
So I did cherry-pick
+ reset HEAD~1 --soft
是否有更简单的方式像樱桃采摘到工作副本?
Is there something simpler like cherry-picking to working copy only?
推荐答案
使用'-n'标志与樱桃采摘是没有提交
Use '-n' flag with the cherry-picking which is "no commit"
看到这里:http://git-scm.com/docs/git-cherry-pick
git cherry-pick -n <HASH>
这篇关于Git:樱桃选择工作副本,无需提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文