Рет қаралды 41,281
Did you just create a new Git branch? Do you want to push that new Git branch to a remote repo like GitHub or GitLab? This quick tutorial on how to push a new branch to remote Git repos hosted on GitLab or GitHub will show you exactly how to do it.
And we'll even show you how to avoid the fatal 'no upstream branch' error developers often run into when they push to GitHub, GitLab or Bitbucket. They key to it all? The following command:
git push --set-upstream origin new-branch
Run it once, and your future Git push and pull commands will work swimmingly.