git push uploads your branch's new commits to GitHub, and moves the matching branch there:
git push
To https://github.com/monster-market/blog.git
af906b0..c3adf11 main -> mainA branch you made yourself doesn't exist on GitHub yet, so git doesn't know where to push it:
git push
fatal: The current branch feature/comments has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin feature/comments
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
Push it once with -u (short for --set-upstream). That creates the branch on GitHub and links yours to it: origin/feature/comments becomes its upstream, the branch it pushes to and pulls from.
git push -u origin feature/comments
branch 'feature/comments' set up to track 'origin/feature/comments'.
To https://github.com/monster-market/blog.git
* [new branch] feature/comments -> feature/commentsAfter that, a plain git push works on that branch too:
git push
To https://github.com/monster-market/blog.git
cfdc0fd..99e3005 feature/comments -> feature/commentsObjectives
- Push
main. - Publish your newsletter branch.
- Push its next commit.