git push origin和git push origin master有什么区别? [英] What is the difference between git push origin and git push origin master

查看:549
本文介绍了git push origin和git push origin master有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 git push origin master
将本地git存储库的主分支推送到名为origin的远程存储库的主分支中有什么区别或与 git push origin ?

解决方案 < $ c> git push git push origin 自从 git version 1.7.11




  • 之前 1.7.11 git push 默认情况下会将所有同样存在于远程的分支以相同的名字推送出去。


  • > 1.7.11 , git push 默认将当前分支推送到远程分支名称。


版本 1.7.11 之前和之后,可以使用 push.default 配置选项来配置默认行为。此配置选项已在 git 版本 1.6.3 中引入。


Is there any difference in pushing the master branch of a local git repository to the master branch of a remote repository called origin with git push origin master or with git push origin?

解决方案

The default action of git push and git push origin has changed since git version 1.7.11:

  • Before 1.7.11, git push by default pushes all branches that also exist remotely with the same name.

  • Since 1.7.11, git push by default pushes the current branch to a remote branch with the same name.

Before and after version 1.7.11, the default behavior can be configured with the push.default configuration option. This configuration option has been introduced in git version 1.6.3.

这篇关于git push origin和git push origin master有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆