问题描述
当我本地工作时目录到中央存储库,执行所有中间分支并提交信息(从上次推送到这个)推入?
换句话说, 会产生确切我的当前工作目录的整个历史的副本,包括提交,分支等,因此可供其他用户从中央存储库中提取?
如果不是所有东西都被推了,什么被排除了?
当你运行分支到同名分支。
When I push a local working directory to a central repository, do all intermediate branches and commit information (from last push to this one) get pushed?
In other words, does push produce an exact replica of the entire history of my current working directory, including commits, branches, etc., and thus are made available to any other user pulling from the central repository?
If not everything is pushed, what gets excluded?
When you run git push, you can set what gets pushed on the command line. For example, this
git push origin my-branch:fooo
pushes branch "my-branch" from your local repository to branch "fooo" at "origin".
When you run git push without any arguments, it pushes to remote set for your current branch (you can see that by git config branch.<branchname>.remote) and does what is configured in push.default configuration value, which, according to docs, can be one of the following:
- nothing - do not push anything.
- matching - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default.
- upstream - push the current branch to its upstream branch.
- tracking - deprecated synonym for upstream.
- current - push the current branch to a branch of the same name.
这篇关于Git Push澄清 - 推动什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!