Git: Difference between revisions

588 bytes added ,  22 February
no edit summary
mNo edit summary
No edit summary
 
Line 5: Line 5:
$ git config --global user.name "Joe Shmoe"
$ git config --global user.name "Joe Shmoe"
$ git config --global user.email "jshmoe@domain.com"
$ git config --global user.email "jshmoe@domain.com"
</syntaxhighlight>
<code>push.autoSetupRemote</code> is the variable to prevent the following message for a repo that hasn't been directly pulled from the remote:
<syntaxhighlight lang="bash">
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'.
</syntaxhighlight>
<syntaxhighlight lang="bash">
$ git config --global --add push.autoSetupRemote true
</syntaxhighlight>
</syntaxhighlight>