diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-06-19 16:41:41 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-24 10:16:49 -0700 |
commit | ed2b18292bfeedc98c9e2b6bd8a35d8001dab2fc (patch) | |
tree | 2364e8eac7fbb0bc0916dc8b063147447137f54b /Documentation | |
parent | config doc: rewrite push.default section (diff) | |
download | tgif-ed2b18292bfeedc98c9e2b6bd8a35d8001dab2fc.tar.xz |
push: change `simple` to accommodate triangular workflows
When remote.pushdefault or branch.<name>.pushremote is set to a
remote that is different from where you usually fetch from (i.e. a
triangular workflow), master@{u} != origin, and push.default is set
to `upstream` or `simple` would fail with this error:
$ git push
fatal: You are pushing to remote 'origin', which is not the upstream of
your current branch 'master', without telling me what to push
to update which remote branch.
The very name of "upstream" indicates that it is only suitable for
use in central workflows; let us not even attempt to give it a new
meaning in triangular workflows, and error out as before.
However, the `simple` does not have to share this error. It is
poised to be the default for Git 2.0, and we would like it to do
something sensible in triangular workflows.
Redefine "simple" as "safer upstream" for centralized workflow as
before, but work as "current" for triangular workflow.
We may want to make it "safer current", but that is a separate
issue.
Reported-by: Leandro Lucarella <leandro.lucarella@sociomantic.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 5d8ff1a8f5..cae687072e 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1848,9 +1848,13 @@ push.default:: pushing to the same repository you would normally pull from (i.e. central workflow). -* `simple` - like `upstream`, but refuses to push if the upstream - branch's name is different from the local one. This is the safest - option and is well-suited for beginners. +* `simple` - in centralized workflow, work like `upstream` with an + added safety to refuse to push if the upstream branch's name is + different from the local one. ++ +When pushing to a remote that is different from the remote you normally +pull from, work as `current`. This is the safest option and is suited +for beginners. + This mode will become the default in Git 2.0. |