Git push without setup remote branch
You are starting working on a new branch. You want to push some commit and you get such message:
$ git push
fatal: The current branch feature/my-branch has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin feature/my-branchAgain, you forgot to set up upstream branch. To not forget it again, you can configure git to do this automatically by running such command:
git config --global push.autoSetupRemote trueAnd then you can just hit git push
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 453 bytes | 453.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
...That's it!