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
?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
This only pushes your master branch to origin
Pushes all your branches to origin
UPDATE - The behavior of Git has changed since this answer was written.
git push origin
on Git >=2.0 by default pushes the current branch to a matching branch of the same name, but this behavior can be overridden viagit config
The default action of
git push
andgit push origin
has changed sincegit
version1.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 thepush.default
configuration option. This configuration option has been introduced ingit
version1.6.3
.