⇦ Back to: Commit | ⇧ Overview | ⇨ Next: Create Pull Request
You can share your branch (and all of the commits required to recreate its history) by pushing it to GitHub.
Click the “Publish Branch” button at the top of the UI
git
on the command lineSwitch to the branch you would like to push:
git switch branch-you-want-to-push
Check you’re on the correct branch by running and checking the output from:
git status
Once you’re on the correct branch, push it by running:
git push -u origin
<aside> 💡 -u means “set the upstream branch for git pull and git status.” - Whenever you run the command git pull in future, git will automatically pull from the remote branch you created. - Similarly, when you run git status, git will check whether your local branch is up-to-date with this remote branch.
</aside>