Loading lesson path
This chapter explains how to push a branch from your local computer to .
Let's create a new local branch, make a change, and push it to .
Example git checkout -b update-readme
Edit a file, then check the status:
Example git add README.md git commit -m "Update readme for "
Use this if your branch doesn't exist on yet, and you want to track it:
Example git push --set-upstream origin update-readme
This overwrites the branch on with your local changes. Only use if you understand the risks.
Example git push --force origin update-readme
Example git push origin --delete update-readme
Push all your local branches to :
Example git push --all origin
Push all your tags to :
Example git push --tags
Someone else pushed changes before you. Run git pull --rebase first, then try again.Make sure you are logged in and have permission to push to the repository.
Formula
Double - check the branch name and spelling.