git - show modified files, except for deleted (or renamed) files

0 votes
I am using this git command to show modified files:

git diff-index --name-only --cached HEAD

It does show modified files, but I need it to make diff output ignore files that no longer exist (that they were either deleted or renamed).
Aug 14, 2018 in Git & GitHub by Hannah
• 14,080 points
16 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
You can use --diff-filter=dr to exclude delete or renamed files.
answered Aug 14, 2018 by Kalgi
• 35,800 points

Related Questions In Git & GitHub

0 votes
1 answer
+1 vote
5 answers
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
+1 vote
2 answers

Git Commands

This command basically adds all your changes ...READ MORE

answered Aug 14, 2018 in Git & GitHub by Kalgi
• 35,800 points
36 views
0 votes
2 answers

difference between git remote and git clone

git remote add just creates an entry in ...READ MORE

answered Aug 7, 2018 in Git & GitHub by Kalgi
• 35,800 points
234 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.