Ok i have the following situation. I have a branch which is called develop.
From develop i created a branch which is called AIOEC-393.
It contains the following commits:
nicoladj77 Reinstalling wordpress 938f469
nicoladj77 AIOEC-122: Added feeds for ai1ec_events 2254569
nicoladj77 AIOEC-122: removed parsed css file d10e29e
nicoladj77 AIOEC-122: added comment to function 38054dd
nicoladj77 AIOEC-393: Starting to move files 6f92360
nicoladj77 AIOEC-393 moved classes and took out require_once calls
b7ab691nicoladj77 AIOEC-393: starting to move base container 87e8b91
nicoladj77 AIOEC-393: moved classes as suggested and refactored a
little while i… … 1093032
I need to create another branch which is based on develop and contains only the last four commits of AIOEC-393 ( of course the commits that start with AIOEC-393 ). How can i do this?
git cherry-pickcan do this. Just give the commit ID you want to merge into your current branch as argument to the command. This will “cherry pick” the commit, even if the commit belongs to a different branch.Or, what also should work is:
This avoids doing a rebase.