Skip to content

Git diff filter gives reverse output for D(deleted) and A (added) #25997

Answered by airtower-luna
manoj798 asked this question in Actions
Discussion options

You must be logged in to vote

Order matters when comparing things with git diff. With current_commit_id previous_commit_id in that order you’ll see what changes there are going from current_commit_id to previous_commit_id, which would be your file getting added back in. Try this: 😉

git diff --name-status previous_commit_id current_commit_id

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants