DEV Community

loading...
Cover image for when Github gets confused

when Github gets confused

itsmukulmishra profile image Mukul Mishra ใƒปUpdated on ใƒป1 min read

Post #03

/> git config core.filemode = true

this value is default set to true and no doubt this can waste good amount of your time if your team has been using different OS

Testcase: you and your colleagues are working on same repo. Your colleague has windows and you got linux. he makes some changes.

You take pull and resume your work. Once you ready to push your code. You run git status and boom. Lots of files you haven't even touched after merging are now showing up as modified

This is because the editor you are using has different settings by host OS itself and that's why it's taking tabs and whitespaces in consideration

Solution: set that configuration value to "false" and it's all fine

Thanks for reading ๐Ÿ˜Š

Discussion (1)

pic
Editor guide
Collapse
lukeswitz profile image
Luke Switzer

Solid one here, too many times writing a .gitignore for OS specific file removal. Keep it clean ๐Ÿ›€๐Ÿงผ, A1 from day one.