Closed RafalSkolasinski closed 1 year ago
Try tig --find-renames --follow -- path/to/some/file
. You can set it permanently using log-options in .tigrc but it was not turned on by default for performance reasons.
Nice! I did not find it in --help
- it may be missing from it.
tig 2.5.1
Usage: tig [options] [revs] [--] [paths]
or: tig log [options] [revs] [--] [paths]
or: tig show [options] [revs] [--] [paths]
or: tig reflog [options] [revs]
or: tig blame [options] [rev] [--] path
or: tig grep [options] [pattern]
or: tig refs [options]
or: tig stash
or: tig status
or: tig < [git command output]
Options:
+<number> Select line <number> in the first view
-v, --version Show version and exit
-h, --help Show help message and exit
-C<path> Start in <path>
Unfortunately I just tried it and though it shows now changes to the file before rename it also starts to show changes to other files (in my case it was git mv
on the whole directory).
Keep in mind Tig is a front-end to present Git commands results in a more efficient way, these options are from Git, not from Tig. See man git-log
.
I often use
to easily view history of changes of a given file.
This unfortunately does not work if file has been moved around (even if git properly registered the file renaming) and the result shown looks like file would only be created at the commit when it was moved (renamed).
Note: this is on Ubuntu 22.04 with tig 2.5.1