Ivan's Space

Writing about leadership, management, emotional resiliency, software engineering, tech, gadgets.




read

This might be old news for some, but there is a merge driver for Git that can automatically perform smart merges of ChangeLogs. I’ve used it for months now and it has always worked flawlessly.

1) Install git-merge-changelog which is part of gnulib . For openSUSE you can use my repository at http://download.opensuse.org/repositories/home:/i-nZ/

2) Make Git aware of it by adding the following to your ~/.gitconfig

[merge "merge-changelog"]
name = GNU-style ChangeLog merge driver
driver = /usr/bin/git-merge-changelog %O %A %B

3) For each repository where you want to use this driver make Git aware of it by adding to $GIT_REPO/.git/info/attributes the following (create the file if it doesn’t exist):

ChangeLog    merge=merge-changelog

That’s it! Enjoy.

Blog Logo

Ivan Zlatev


Published

Image

Ivan's Space

Writing about leadership, management, emotional resiliency, software engineering, tech, gadgets.

Back to Overview