Closed ghost closed 1 year ago
git
by default shows absolute paths (from the base of the repo). If you pass the --relative
flag you will get what you want. You can put this in your ~/.gitconfig
[diff]
relative = true
More information on Stack Overflow.
Thanks!
When I'm viewing a diff with "git diff ." while beeing in a subdirectory of a project the paths shows still point to the root of the project, which is a bit annoying since I cannot just select and copy the paths to a new git command as i'd usually do.
Not sure if this can be fixed, but perhaps by taking the current working directory into account?