Help, I can't push: “has no upstream branch”
Your new branch does not exist on the remote yet. One push with -u creates it and links the two.
git push fatal: The current branch feature/login has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin feature/login To have this happen automatically for branches without a tracking upstream, see 'push.autoSetupRemote' in 'git help config'.
The fix
git push -u origin feature/loginPushes the branch and makes
origin/feature/loginits upstream. From now on plaingit pushandgit pulljust work.
feature/login is an example. Replace it with your own.
Why this works
A new local branch has no partner on the remote, so plain git push does not know where to go. -u (short for --set-upstream) pushes the branch and remembers the pairing, after which push and pull work without arguments. Since Git 2.37 you can make this automatic: git config --global push.autoSetupRemote true.