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
?
Asked
Active
Viewed 499 times
0

coder.chenzhi
- 171
- 1
- 11
1 Answers
2
Use the following syntax;
git show -- '*.java'

Edmund Dipple
- 2,244
- 17
- 12
-
`\*.java` or `'*.java'` to protect shell metacharacter (`*`). – phd Jan 02 '18 at 15:31
-
@Edmund Dipple Really appreciate your help. BTW, how to exclude some path, like 'src/test/java', with 'git show' command? – coder.chenzhi Jan 07 '18 at 09:28
-
@Edmund Dipple I have found the solution in this [post](https://stackoverflow.com/questions/4380945/exclude-a-directory-from-git-diff) – coder.chenzhi Jan 07 '18 at 09:55