X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fcore-tutorial.txt;fp=Documentation%2Fcore-tutorial.txt;h=35579cc5b0ccaf4eeac8cf134d887ccb5182550b;hb=76b927f19f207b3f71b1c675bd75680aaedcb001;hp=b8fa29992000f3caec5602a98fe74c9938c8f604;hpb=927a503cd07718ea0f700052043f383253904a56;p=git.git diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt index b8fa2999..35579cc5 100644 --- a/Documentation/core-tutorial.txt +++ b/Documentation/core-tutorial.txt @@ -1667,6 +1667,26 @@ complain, telling you that the remote `master` head does not fast forward. You need to pull and merge those other changes back before you push your work when it happens. +The `git push` command without any explicit refspec parameter +pushes the refs that exist both in the local repository and the +remote repository. So the last `push` can be done with either +one of these: +------------ +$ git push origin +$ git push repo.shared.xz:/pub/scm/project.git/ +------------ +as long as the shared repository does not have any branches +other than `master`. +[NOTE] +============ +If you created your shared repository by cloning from somewhere +else, you may have the `origin` branch. Your developers +typically do not use that branch; remove it. Otherwise, that +would be pushed back by the `git push origin` because your +developers' repository would surely have `origin` branch to keep +track of the shared repository, and would be counted as "exist +on both ends". +============ Advanced Shared Repository Management -------------------------------------