Luu Tuyen to [email protected] • 3 months agoRemember: GNU/Linux and other UNIX systems can make files that are case-sensitive, Windows can't make files that are case-sensitivelemmy.worldmessage-square222fedilinkarrow-up1686
arrow-up1686imageRemember: GNU/Linux and other UNIX systems can make files that are case-sensitive, Windows can't make files that are case-sensitivelemmy.worldLuu Tuyen to [email protected] • 3 months agomessage-square222fedilink
minus-squareDefederateLemmyMllinkfedilink39•3 months agoTo screw with Windows users, you should sometimes put a README.md as well as a README.MD in your git repos. It leads to interesting results.
minus-square@[email protected]linkfedilink3•3 months agosurely Git warns about stuff like this when you clone it, right ?
minus-squareDefederateLemmyMllinkfedilinkEnglish4•3 months agoIt tells you there’s a name clash, and then it clones it anyway and you end up with the contents of README.MD in README.md as an unstaged change.
minus-square@[email protected]linkfedilink2•3 months agosounds like actually a good solution … tho doesnt sound like it would work for more than 2 similarly-named files
minus-squareDefederateLemmyMllinkfedilink3•3 months agoI don’t think it’s intended as a “solution”, it just lets the clobbering that is caused by the case insensitiveness happen. So git just goes: checkout content of README.md to README.md (OS creates README.md) checkout content of README.MD to README.MD (OS overwrites README.md) If you add a third or fourth file … it would just continue, and file gets checked out first gets the filename and whichever file gets checked out last, gets the content.
minus-square@[email protected]linkfedilink1•3 months agothats better than Git just choosing a file to keep.
To screw with Windows users, you should sometimes put a README.md as well as a README.MD in your git repos. It leads to interesting results.
surely Git warns about stuff like this when you clone it, right ?
It tells you there’s a name clash, and then it clones it anyway and you end up with the contents of
README.MD
inREADME.md
as an unstaged change.sounds like actually a good solution … tho doesnt sound like it would work for more than 2 similarly-named files
I don’t think it’s intended as a “solution”, it just lets the clobbering that is caused by the case insensitiveness happen.
So git just goes:
If you add a third or fourth file … it would just continue, and file gets checked out first gets the filename and whichever file gets checked out last, gets the content.
thats better than Git just choosing a file to keep.