8 ms·
Just want to throw a small one in there: branch names are all lower case. Prevents strange issues when you use a case insensitive file system like on OSX or Wi
by amarraja 6y ago
Just want to throw a small one in there: branch names are all lower case.
Prevents strange issues when you use a case insensitive file system like on OSX or Windows
- Spivak 6y agoSave yourself the headache and just make your project directories case sensitive. fsutil.exe file setCaseSensitiveInfo "C:\path\to\dir" enable
- kaens 6y agocan't do on osx without reformat if i'm recalling correctly
- taivokasper 6y agoAPFS filesystem has volumes that share shape with Macintosh HD. You can create a separate encrypted case sensitive volume called Development
- httpsterio 6y agothat's like using a nuke to hammer a nail.
- wwright 6y agoIt really isn’t. APFS has excellent support for logical volumes, and it’s barely any harder than creating a new folder. (Each volume can also use an extra encryption layer if you want, which can be super useful.)
- acdha 6y agoWhat kind of issues have you encountered? Since NTFS, HFS+, and APFS are all case-preserving the only thing I've ever run into was a Unix-only project where they files which differed only in case (i.e. Makefile and makefile) and the project team fixed that by recognizing that it was just asking for trouble.
- Merad 6y agoI make a branch named 'feature/ABC-123', do some work, and push to the server. You want to take over my branch so you do a fetch then run the command 'git checkout feature/abc-123'. You will check out my branch, but when you go to push back to the server you're going to be push a new branch with a lower case file name unless you realize what has happened and know that you need to run 'git push origin feature/abc-123:feature/ABC-123' to push your changes to the existing remote branch.
- amarraja 6y agoYep exactly this. We've gotten into messes before when people are working on - or think they are - the same branch. Some os think they are the same, others different. Also just finished migrating something that ran on IIS to linux, and got the casing pains once again. If the universe were to be reinvented, I ask please make everything case sensitive by default
- acdha 6y agoInteresting — I've never hit that, presumably because it always works the right way if you use tab-completion or are copying a command from the GitHub/GitLab UI. That's good to know about.
- Merad 6y agoYeah, it’s not exactly a common problem. I’ve only seen it come up in that scenario when two people with different casing habits try to share a branch.
- hinkley 6y agoI don't recall seeing anything in git that involves putting the branch name on the filesystem. Not even poking around in the .git directory. What are you seeing?
- DHowett 6y agoSo, every branch is represented by a file in .git/refs; you’ll find, for example, .git/refs/heads/master alongside any other local branches you’ve created. There’s an analogous tree for remote branches!
- hinkley 6y agoWell, hell. I've done surgery on those files before. Not sure how I forgot that.