Every time I create a branch and push it, this happens:
$ git push fatal: The current branch foo has no upstream branch. To push the current branch and set the remote as upstream, use
git push --set-upstream origin foo
$ git push --set-upstream origin foo
Given I am on branch foo, the whole '--set-upstream origin foo' feels like redundant typing (or rather, copy-pasting).
Is there a way I can set a config option so that 'git push' while on a branch that has no upstream automatically sets the upstream branch name to match the local branchname?