Git automatic smart ChangeLog merging

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.

  • Twitter
  • Facebook
  • FriendFeed
  • StumbleUpon
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Reddit
  • Tumblr
  • PDF
  • Print
  • email
Rating: (No Ratings Yet)
Loading ... Loading ...
View Comments
Published: Mar 19th, 2009 (Views: 402)
Categories: Coding
Tags: ,
blog comments powered by Disqus