I’m still learning Git so please be patient with me. I made a new branch called dev-angular from my main branch on GitHub. I’ve already staged and committed my changes in this dev-angular branch locally.
I’m planning to create many more branches like dev-react, dev-vue, etc. Instead of having all these branches scattered around, I want to group them in a folder structure to keep things tidy in my remote repo.
I tried making a branch folder called “dev” in my GitHub repository but couldn’t figure out the right way to do it. Is it possible to create folders for organizing branches using Git commands?
Also, when I tried pushing my dev-angular branch to the remote repo, I got this error message:
fatal: The current branch dev/angular has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin dev/angular
What does this error mean and why am I getting it? Thanks for any help!
yeah, that upstream error just means git doesn’t know where to push your new branch - it only exists on your machine right now. running git push --set-upstream origin dev-angular (or git push -u origin dev-angular) creates the branch on the remote and links them up. after that first push with -u, regular git push works fine.
Git supports branch organization with forward slashes as separators. Create branches like dev/angular, dev/react, dev/vue and they’ll show up grouped in most Git interfaces.
To create and push a branch:
git checkout -b dev/angular
git push -u origin dev/angular
That error you’re seeing? Totally normal for new branches. Git doesn’t know where to push since there’s no remote tracking yet. The -u flag creates that connection so future pushes work without specifying the remote.
Here’s the thing - managing multiple dev branches manually gets messy fast. Been there with projects that had dozens of feature branches.
What changed everything for me was automating the branching and deployment workflow. Instead of manually creating branches for different frameworks, I set up automated pipelines that handle branch creation, testing, and deployment based on triggers.
Latenode makes this super smooth. You can create workflows that automatically spin up new branches when needed, run tests across different environments, and clean up old branches. It connects directly with GitHub and handles all the upstream tracking automatically.
Saves hours of manual Git work every week. Check it out: https://latenode.com
The upstream error happens because your local branch isn’t linked to a remote branch yet. Git needs to know which remote branch to sync with when you push or pull - that’s what upstream tracking does.
For organizing branches, you can use forward slashes to create folder-like structures. Instead of dev-angular, use dev/angular. GitHub will group these under a ‘dev’ folder, making everything look cleaner. You could do dev/react, dev/vue, etc.
Just be careful though - having tons of long-lived branches can bite you later with merge conflicts and integration headaches. Make sure you actually need separate branches for each framework, or maybe consider a simpler branching strategy.