Giter Site home page Giter Site logo

git-gnu-changelog's Introduction

I realize that ChangeLogs are the epitome of pointlessness. Nevertheless, many projects use them and, for whatever reason, are reluctant to give them up. So, I wrote some scripts to help ease the pain of managing these wretched files with git.

If you're a project maintainer and you use the existence of these scripts to justify the continued existence of ChangeLog files, then I hope something bad happens to you, like you're forced to write in PHP and COBOL for all eternity, meticulously typing out "Likewise" in millions of ChangeLog entries by hand.

Using these scripts:

Put the git-* scripts from this repository into your PATH. This will let git find them.

In your ChangeLog-using project, use the provided prepare-commit-msg in your hooks, like so:

cd $project/.git/hooks
ln -s $git_gnu_changelog/prepare-commit-msg

Finally, define a "changelog" diff driver. This is used by git gdb-email (see below). To do this, add this to your ~/.gitconfig:

[diff "changelog"]
	name = GNU-style ChangeLog diff driver
	command = /bin/true

This driver will only be used by git gdb-email, so it is safe to define -- it will not affect your ordinary development.

Now, when developing, write ChangeLog entries as usual, in the appropriate files in the tree. When you commit, the ChangeLog entries will be automatically put into the commit message. This works well with rebasing and editing commits as well -- the script will replace the old ChangeLog entries in the commit message with the updated ones from the commit itself.

The ChangeLog merge script makes sure that merges and rebases will go smoothly. You won't see conflicts arising from the ChangeLog files.

If you want to fix up the date on a ChangeLog entry, you can use git simple-fixup. It examines the most recent commit and rewrites the dates on all the modified ChangeLog files. You can then git commit --amend to update the commit; the commit message hook will automatically update the date in the commit message

When you want to submit your series, you'll probably want to fix up the dates on all the ChangeLog entries. You can use git fixup-changelogs to rewrite the dates in the files and the commits for a series of commits.

Finally, when submitting a patch series, many GNU projects do not want the ChangeLog files to appear in the diffs. For projects like this, use git gdb-email. It works just like git send-email, but it strips ChangeLog files from the email -- leaving just the copies in the commit messages themselves.

git-gnu-changelog's People

Contributors

jicama avatar tromey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.