I created a new branch named newbranch
from the master
branch in git. Now I have done some work and want to merge newbranch
to master
; however, I have made some extra changes to newbranch
and I want to merge newbranch
up to the fourth-from-the-last commit to master
.
I used cherry-pick
but it shows the message to use the right options:
git checkout master
git cherry-pick ^^^^HEAD newbranch
Can I use git merge
to do it instead?
git merge newbranch <commitid>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…