How to keep a clean history after hotfix finish?

130 views
Skip to first unread message

Simon

unread,
Jun 8, 2014, 10:47:45 AM6/8/14
to gitflo...@googlegroups.com
Hi,

I'd like to cherry-pick commits from the Hotfix branch to the develop branch instead of a merge.

Is there a way to do this via a hook or other way, to run the cherry pick rather than the merge when running the following command?
git flow hotfix finish --notag --nobackmerge

The hashes for the cherry-pick can be found with this command:
git log --oneline develop..hotfix/[name]  | grep -vE "^[a-z0-9]* Merge branch '[^'].*?'$" | cut -f1 -d" "

Simon

Simon

unread,
Jun 8, 2014, 10:48:29 AM6/8/14
to gitflo...@googlegroups.com
I'm using git-flow-avh.

Peter van der Does

unread,
Jun 9, 2014, 8:27:39 AM6/9/14
to gitflo...@googlegroups.com


You do this through the hook file: post-flow-hotfix-finish
It's just a shell script so you could use the line above to get the hashes and then automatically cherry-pick them.

Peter van der Does

Simon

unread,
Jun 15, 2014, 12:59:30 PM6/15/14
to gitflo...@googlegroups.com
Wouldn't this hook run only after the merge back to develop already happened?

Peter van der Does

unread,
Jun 16, 2014, 7:47:02 AM6/16/14
to gitflo...@googlegroups.com


On Sunday, June 15, 2014 12:59:30 PM UTC-4, Simon wrote:
Wouldn't this hook run only after the merge back to develop already happened?



Yes, but when you use the flag --nobackmerge there won't be a merge back and you can do what you like to do.
Reply all
Reply to author
Forward
0 new messages