I don't use Git that often so bear with me, please. From my origin main branch repository in GitHub, I locally created a new branch (feature-typescript
) using Git. I have staged and committed my files within the feature-typescript
branch. I'm thinking there might be a lot of feature-[name]
branches. So instead of having multiple branches with the same beginning name, I would like to put them in a directory to make my remote repository branch category more organized.
I have tried to create a branch directory named feature within my remote repository but I'm not able to figure out how. Is there a way I can create a new directory named feature to my GitHub repository using Git?
One last thing I want to add that I'm confused about. As I mentioned earlier, I have already staged and committed my feature-typescript
branch. I tried to push it to my remote repository but I get this error:
fatal: The current branch feature/typescript has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin feature/typesccript
Can anyone explain the reason for this? Thank you in advance!