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
• 18,030 points
45 views

1 answer to this question.

0 votes
You can use --diff-filter=dr to exclude delete or renamed files.
answered Aug 14, 2018 by Kalgi
• 51,830 points

Related Questions In Git & GitHub

0 votes
1 answer
+1 vote
5 answers

ERROR: 'git' is not recognized as an internal or external command.

You need to make sure git.exe is ...READ MORE

answered May 7, 2019 in Git & GitHub by Yesha
6,194 views
0 votes
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 6,910 points
127 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
423 views
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
• 51,830 points
113 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
• 51,830 points
2,025 views