Quantcast
Channel: git diff between two different files - Stack Overflow
Viewing all articles
Browse latest Browse all 12

Answer by Steven Wexler for git diff between two different files

$
0
0

Specify the paths explicitly:

git diff HEAD:full/path/to/foo full/path/to/bar

Check out the --find-renames option in the git-diffdocs.

Credit: twaggs.

git diff <path> <path> will compare two working-tree files as long as at least one of them is not in a git repo or the command is run from outside of a git repo. If you want to ensure git knows you are only comparing files in the working-tree (that is, on files in your directory rather than files added or commited to git), use git diff --no-index <path> <path>


Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>