Tutorial by Examples

git push will push your code to your existing upstream. Depending on the push configuration, it will either push code from you current branch (default in Git 2.x) or from all branches (default in Git 1.x). Specify remote repository When working with git, it can be handy to have multiple remote ...
Sometimes, when you have local changes incompatible with remote changes (ie, when you cannot fast-forward the remote branch, or the remote branch is not a direct ancestor of your local branch), the only way to push your changes is a force push. git push -f or git push --force Important not...
General syntax git push <remotename> <object>:<remotebranchname> Example git push origin master:wip-yourname Will push your master branch to the wip-yourname branch of origin (most of the time, the repository you cloned from). Delete remote branch Deleting the remote br...
Current updates the branch on the remote repository that shares a name with the current working branch. git config push.default current Simple pushes to the upstream branch, but will not work if the upstream branch is called something else. git config push.default simple Upstream pushes to t...
git push --tags Pushes all of the git tags in the local repository that are not in the remote one.

Page 1 of 1