Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Flow: How to keep master log clean?

Tags:

git

git-flow

I've started git flow and loved it for many reasons. However, one of our primary goal is to keep the master branch log very clean. We just want to see each released log in master branch (that means when we finish a release the commit log should be in the master).

Please see the output of git log or git log master in master branch`

Merge branch 'release/r1'


release bug fixed


feature 3 done


feature 2 done


feature 1 done


Initial commit ~

what we want to see here are: 'initial commit' and 'merge branch release/r1'. we don't want to see the commit log that are done in feature or release branch.

is that possible?

like image 482
HungryCoder Avatar asked Jul 30 '26 22:07

HungryCoder


1 Answers

The easiest way would be to add a framework which allows you to plug all kind of controls on the commit, in order for you to enforce policies when said commits are done on the master branch.

If you have one "blessed" repo, you can add gitolite on the server of that repo, and add VREFs: small hooks that will be triggered on each push.

like image 180
VonC Avatar answered Aug 02 '26 12:08

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!