Track changes in a line from a file using git
= git-line-history(1) =
== NAME ==
git-line-history - Track changes in a line from a file using git
== SYNOPSIS ==
git-line-history file regexp
== DESCRIPTION ==
+git-line-history+ helps to find out which commits have modified a line in the whole revision history of a single file from a git repository.
This tool was formerly made to retrieve the version changes in a git tree in order to create tags.
== ARGUMENTS ==
The 2 mandatory arguments are the file on which the research should be performed, and the regexp to be used to track the line change.
== USAGE ==
=== Version changes ===
To search for all commits that change the version from a python module, this line could be used:
A possible output with all version changes could be something similar to:
=== Setting up tags ===
To tag a repository against change sets from the previous example, the following command could be used:
git line-history setup.py version | sed -n 's/^([^:]+):."([^"]+)"./git tag -m "Version \2" \2 \1/p' | sh
== SEE ALSO ==
git(1), grep(1), regex(7).
== HISTORY ==
2011/03/26:
First release.
== BUGS ==
No time to include bugs, command actions might seldom lead astray user's assumption.
== AUTHORS ==
+git-line-history+ is written by Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>.
== COPYRIGHT ==
Copyright © 2011 Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>.
Relased under WTFPL (http://sam.zoy.org/wtfpl/COPYING[]).