语法
git push [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
[-u | --set-upstream] [-o <string> | --push-option=<string>]
[--[no-]signed|--signed=(true|false|if-asked)]
[--force-with-lease[=<refname>[:<expect>]]]
[--no-verify] [<repository> [<refspec>…]]
描述
将本地分支的更新,推送到远程分支上。
参数
<repository>
The "remote" repository that is destination of a push operation. 即远程仓库的名字。
<refspec>…
Specify what destination ref to update with what source object. 格式为 <src>:<dst>,即本地分支和远程分支的名字。
例子
1.
$ git push origin master:master
将本地分支master的更新,推送到远程仓库origin中的master分支上。
2.
$ git push origin
将当前分支的更新推送到远程仓库origin中的对应分支上。