Create a Git branch / x / y function?

Currently, I have a Git feature/i18n branch that I use to create different localizations of my application. I want to create a sub-branch for each language so that I can integrate them separately. Is it possible to create subdirectories, for example. feature/i18n/French or feature/i18n/Spanish , so are they easier to organize? I get the following error message from Git: error: unable to resolve reference refs/heads/feature/i18n/spanish: Not a directory .

+4
source share
2 answers

Yes, you can create these branches. The problem preventing you from redistributing your i18n namespace, so to speak, is that you already have a feature/i18n branch.

Each branch is created as a file under .git / refs / heads, so when you created the branch, Git created a .git/refs/heads/feature/i18n file.

Now you are trying to create .git/refs/heads/feature/i18n/spanish , for which Git is trying to create an i18n folder that it cannot, because there is a file with the same name.

To create these sub-branches, you will need to delete or rename the feature/i18n branch.

+5
source

you created the branch function / i 18n

This means that you created a file called Function / i 18n.

Now, to create the / i 18n / spanish file function, i18 must be a directory.

To fix this delete function / i18n branch and create the / i18n / spanish function

+2
source

All Articles