git push 和 git push origin master 的区别
Difference between git push and git push origin master
我想知道如果我只使用 git 命令:
git push
如果我使用
git push origin master
那么,它们有什么区别呢?
我正在 gitlab 工作,并且我拥有我正在从事的项目的开发人员访问权限。
我正在使用 windows 命令行。
git push: works like git push "remote", where "remote" is the current
branch’s remote (or origin, if no remote is configured for the current
branch).
和
git push origin master: Find a ref that matches master in the source
repository (most likely, it would find refs/heads/master), and update
the same ref (e.g. refs/heads/master) in origin repository with it. If
master did not exist remotely, it would be created.
更多信息请参考:link
我想知道如果我只使用 git 命令:
git push
如果我使用
git push origin master
那么,它们有什么区别呢?
我正在 gitlab 工作,并且我拥有我正在从事的项目的开发人员访问权限。 我正在使用 windows 命令行。
git push: works like git push "remote", where "remote" is the current branch’s remote (or origin, if no remote is configured for the current branch).
和
git push origin master: Find a ref that matches master in the source repository (most likely, it would find refs/heads/master), and update the same ref (e.g. refs/heads/master) in origin repository with it. If master did not exist remotely, it would be created.
更多信息请参考:link