Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent editing on mac resulting in whole file appearing as deleted and added lines?

Tags:

git

I recently started coding on a mac. I checked out my source from my repo at github, made changes and pushed from a mac and suddenly the whole file appears as deleted and added lines. I suspect this is because of newline character differences.

I used to develop on ubuntu and prior to that on Windows.

How can I avoid this with future commits, is there any conversion that needs to be done to the files before committing to get the actual diff to show?

like image 619
Raj Avatar asked Dec 31 '25 01:12

Raj


1 Answers

Should be fine now that you have synced with your repo. New files will be correct. And if you pushed and pulled then you should have the same code on both sides.

P.S great avatar.

like image 165
earlonrails Avatar answered Jan 02 '26 15:01

earlonrails



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!