From: Eric Sunshine Date: Fri, 19 Jul 2013 00:54:16 GMT Subject: Re: [PATCH v2] pull: require choice between rebase/merge on non-fast-forward pull Message-ID: In-Reply-To: <7vvc471x1s.fsf_-_@alter.siamese.dyndns.org> On Thu, Jul 18, 2013 at 3:35 PM, Junio C Hamano wrote: > Add a safety valve to fail "git pull" that does not explicitly > specify what branch from which repository to integrate your history > with, when it is neither a fast-forward or "already up-to-date", > until/unless the user expressed her preference between the two ways > of integration. > --- > diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt > index 24ab07a..86f5170 100644 > --- a/Documentation/git-pull.txt > +++ b/Documentation/git-pull.txt > @@ -97,6 +97,14 @@ must be given before the options meant for 'git fetch'. > Options related to merging > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > > +When `git pull` that does not explicitly specify what branch from > +which repository is to be integrated with your history on the > +command line, recent Git will refuse to work until you specify how > +that integration should happen, either with a command line option > +(`--merge` or `--rebase`) or a configuration variable (`pull.rebase` > +or `branch..rebase`, which is the same as `--merge` > +(`--rebase`) when set to `false` (`true`) respectively. This paragraph-long single sentence may be intimidating. Perhaps some simplification is possible: As a safety measure, bare `git pull` (without repository or branch) needs to be told how to integrate pulled changes with your history; either via `--merge` or `--rebase`. Also see configuration variables `pull.rebase` and `branch..rebase` in linkgit:git-config[1]. I intentionally omitted the true/false explanation of the configuration variables since the user can follow the link and read about them. It also may make sense to drop mention of those variables altogether since they are already described (including link) in the description of --rebase. I also intentionally omitted "recent Git" since it's rather nebulous.