Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Diff Shows Reversed Colors/Indicators

Tags:

git

I am looking at my git diff and the lines are exactly reversed. New lines show with "-"s and red colors, and the removed lines show with "+"s and green colors.

+ deleted line [green]
- newline [red]

Nothing in my .gitconfig seems to indicate anything amiss.

Anyone ever seen this happen before? What did you do to fix? Thanks!

like image 694
Brian Moore Avatar asked Oct 16 '25 14:10

Brian Moore


1 Answers

The direction of the diff is important: git diff A B will provide different output than git diff B A and the difference will be in reversing what was deleted and what was added.

like image 87
Eugene Sajine Avatar answered Oct 19 '25 07:10

Eugene Sajine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!