• 0 Posts
  • 2 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle
  • Inside git’s internal plumbing folder, git holds a file with the branch name and all of the references (files and changes) for that branch.

    When you make a new branch git will update its internal plumbing checking to see if the new branch already exists, updates its references to the new branch if it doesn’t (all held internally in a case sensitive way). It will then make that new branch file, git has already checked that the case senitive name for the branch doesn’t exist internally, so it should be good to go.

    Part of its process is creating that internal branch file… But wait!

    Windows doesn’t have case sensitive naming so when it tries to make that new branch file it will overwrite the old one (since it shouldn’t exist by git’s own reference!) All of the files and references for it now get nuked.

    Now you’re at best back to wherever that originally named branch came from, at worse your .git folder is properly borked.