After doing
git init git remote add origin <some_origin> You can's simply commit and push, since it says
fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master To have this happen automatically for branches without a tracking upstream, see 'push.autoSetupRemote' in 'git help config'. Is there a way of setting the upstream branch without using git push?
Eg. something like:
git upstream origin master
git branch --set-upstream-to=some-branchgit branchfor that. There is a sanity check, which only allows to set it to a known branch, so you technically need to rungit fetch originat least once if you want to setgit branch -u origin/that_branchgit push -u..git/configand set the upstream by providingremoteand amergesetting for the local branch. So, a line withremote = some-remoteand another withmerge = refs/heads/some-branch. And you are on your own. :-)