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,520 points
5,525 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
• 52,350 points

Related Questions In Git & GitHub

0 votes
1 answer
+2 votes
5 answers

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

You have to set your PATH to ...READ MORE

answered Aug 2, 2018 in Git & GitHub by Sophie may
• 10,620 points
47,412 views
0 votes
1 answer

fatal: Not a git repository (or any of the parent directories): .git

Hi@akhtar, I think you didn't initialize your folder ...READ MORE

answered Apr 29, 2020 in Git & GitHub by MD
• 95,460 points
8,878 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 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
• 52,350 points
1,038 views
0 votes
3 answers

difference between git remote and git clone

HI.... GIT REMOTE add just creates an entry in ...READ MORE

answered Jul 11, 2020 in Git & GitHub by anonymous
23,435 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP