I am working on a java project but some output saved as csv file also tracked in the git. Sometimes the csv file changed completely so that the diff was very large. How to show java files diffs when using git show?
1 Answer
Use the following syntax;
git show -- '*.java'
3 Comments
phd
\*.java or '*.java' to protect shell metacharacter (*).coder.chenzhi
@Edmund Dipple Really appreciate your help. BTW, how to exclude some path, like 'src/test/java', with 'git show' command?
coder.chenzhi
@Edmund Dipple I have found the solution in this post