git-push: revamp page
hopefully making it more useful and explicit
This commit is contained in:

committed by
Agniva De Sarker

parent
672878abd0
commit
16f0fc9d50
@@ -1,23 +1,31 @@
|
||||
# git push
|
||||
|
||||
> Push commits to a remote repository.
|
||||
> Push commits to a remote (upstream) repository.
|
||||
|
||||
- Publish local changes on a remote branch:
|
||||
- Send local changes in the current branch to its remote counterpart:
|
||||
|
||||
`git push`
|
||||
|
||||
- Send local changes in a given branch to its remote counterpart:
|
||||
|
||||
`git push {{remote_name}} {{local_branch}}`
|
||||
|
||||
- Publish local changes on a remote branch of different name:
|
||||
- Publish the current branch to a remote repository, setting the upstream branch name:
|
||||
|
||||
`git push {{remote_name}} {{local_branch}}:{{remote_branch}}`
|
||||
`git push {{remote_name}} -u {{remote_branch}}`
|
||||
|
||||
- Remove remote branch:
|
||||
- Send changes on all local branches to their remote counterparts:
|
||||
|
||||
`git push {{remote_name}} :{{remote_branch}}`
|
||||
`git push --all`
|
||||
|
||||
- Remove remote branches which don't exist locally:
|
||||
- Delete a branch in a remote repository:
|
||||
|
||||
`git push {{remote_name}} --delete {{remote_branch}}`
|
||||
|
||||
- Remove local references to branches that have been deleted in a remote repository:
|
||||
|
||||
`git push --prune {{remote_name}}`
|
||||
|
||||
- Publish tags:
|
||||
- Publish tags that aren't yet in the remote repository:
|
||||
|
||||
`git push --tags`
|
||||
|
Reference in New Issue
Block a user