git browse
is an interactive version of git blame
written using Python and
curses. It is inspired by the TextMate Git bundle's interactive blame
interface.
-
Clone the Git repository:
git clone git://github.com/georgebrock/git-browse.git
-
Add the
bin
directory to yourPATH
. For example, you might put the following line in your.bashrc
file:export PATH=$PATH:~/git-browse/bin
git browse [rev] file
rev
is an (optional) revision to start from. It defaults toHEAD
(i.e. the revision you have currently checked out)file
is the name of a file in your Git repository that you want to examine.
This will bring up a browsing interface. Navigate around the file using the usual keys that should be familiar to anyone who uses Less, and use [ and ] to move the previous or next revisions of the file.
Exit with q, or exit and pass the currently selected commit to
git show
with s.
Run git browse --help
or man git-browse
to see the full documentation.
- The focused line is maintained when moving between revisions, even when lines have been added or removed before the focused line.
- Use less- and vim-style searching (/ to search forwards, ? to search backwards, n and N to jump to the next and previous matches).
- Jump to a line by typing the line number and pressing return.
git browse
is licensed under the MIT license. See the LICENSE file for
details.