Git, git extensions and the case-sensitive thing...


As a general rule, I always use some kind of source control on all my projects. For the matter of fact I use GIT even when some people might find that weird, being myself a .NET developer .... But hey... GIT is in my opinion the best things out there when it comes to really good team development tools.

Then the second part is to use it with people online, for that github.com is pretty good, and the final part is a good add-in for Visual Studio or a shell extension. I use Git-Extensions for all that and so far, except for the little problem I am going to explain here, I have no complains at all.

The problem:
Git branches are case-sensitive, so you can have "test" and "TEST" as different branches, and it will work fine if you use linux as a client. But when using git-extensions from Windows, and ran into a huge problem, where one of my friends was pushing code and I was not able to see it. She was uploading code to same branch but just with different casing. Is just a typing mistake, and then you get what it seems a huge problem in your hands. The Git-Extensions tool will even show you the to branches completely on UPPERCASE, so you wont have a chance at all, and picking any of them wont do any difference.

But it is not so difficult to fix it...

The solution:
Well, not pretty clean, but you can just delete the branch from github.com, and mix branches in local git. How to delete the branch from git-hub?, easy after some googling:

git push MY_REMOTE :mybranch

and it worked fine! note that right after MY_REMOTE there is a space. that means something like,  take "nothing" from here and put it on the "mybranch" branch at "MY_REMOTE". Which is actually just deleting the branch. I would really love if they just add a command to just do that, or just add that option from the website itself.

The note: Careful with casing when using git on windows!

Comments

Popular posts from this blog

Get-ChildItem vs Dir in PowerShell

The case for a 4 week sprint

NODE.js fs.readFile and the BOM marker