I currently have a Git branch feature/i18n which I am using to create different localizations of my app. I want to create a sub-branch for each language so I can integrate them separately. Is it possible to create sub-directories, e.g. feature/i18n/French or feature/i18n/Spanish, so they are more easily organized? I am getting the following error message from Git: error: unable to resolve reference refs/heads/feature/i18n/spanish: Not a directory.
I currently have a Git branch feature/i18n which I am using to create different
Share
Yes, you can create those branches. The problem preventing you from sub-dividing your i18n namespace, so to speak, is that you already have the
feature/i18nbranch.Every branch is created as a file under .git/refs/heads, so when you created your branch, Git created the file
.git/refs/heads/feature/i18n.Now you’re trying to created
.git/refs/heads/feature/i18n/spanish, for which git tries to create ani18nfolder — which it can’t, because there is a file of the same name.To create those “sub-branches”, you’ll have to delete or rename your
feature/i18nbranch.