Why Git refs do not have a file extension

I recently came across a common problem in Git when creating branch groups:

I had a branch named tim .
I wanted to create a folder / group called " tim " with the branch " tim ", resulting in the path of the branch " tim / tim ".

When I tried to do that, Git really hated me, because the folder " tim is " the answer " tim is " were exactly the same as Git.

My question is: if anyone knows why the branch does not have an extension of some kind to get around this problem? Say .gitbranch or something else?
Obviously, accessing the file will have a bit more work on adding .gitbranch , but hardly anything compared to the work the user has to do to get around this problem, especially when you are on the development team. (Anyone who previously cloned the repo had to manually go to their refs folder and delete any branch trace named " tim"otherwise they could not get it!)

If this is really a legitimate problem, I will raise it with the appropriate channels, but I wanted to check if anyone could find out why they could do this purposefully?

Thanks everyone,
Tim.

+5
source share
2 answers

I do not think that there is any specific justification in any case. Unix usually does not use file extensions, so there were none. This means that you cannot have fooand at the same time foo/anything. This has been documented and is now done in stone and will not change, although deleted links are usually stored in packaged format in a single file these days.

However:

  • git fetch , , -p (--prune). , git.
  • gui, fetch . .
+5

Git tim ( ) tim/ ( ) - (. git-check-ref-format).

0

All Articles