I'm seeking a tool to help when probing a file's history. Specifically, I want to view the entire contents of the file, but be able to step backward and forward in time. Extra joy for decorations indicating the diff from previous rev or some other specified rev.
Currently I use git blame
, and can see what changes impacted each current line. Then I have to relaunch a viewer for that file with some particular commit. It's labor intensive, and if a tool already automates this I'd love to use it!
Perforce's timelapse view is the best tool to date I've seen for this task.
gitk -- filename
should do what you want, if you kick up the lines of context in the middle, and scroll up and down through the revisions.
Tig, a text mode interface for git, offers a blame view that offers some of this functionality:
It does not preserve the viewing location when stepping to a parent commit (it seems to when using the line's commit).
Here is a Git Time-Lapse View tool that I have written in Java:
https://github.com/JonathanAquino/git-time-lapse-view
git gui blame is an option, although it's not as good.
Example for gc_storage from Ansible:
git gui blame --line=155 library/cloud/gc_storage
Right click a line and select Blame Parent Commit to move back in time, returning to more recent changes with the view history arrow in the top left.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With