John Keeping <john@xxxxxxxxxxxxx> writes: > I have to wonder how often "git pull" with no arguments actually does > what users really want (even if they don't know it!) when it doesn't > result in a fast-forward (and pull.rebase isn't configured). If you are in a totally centralized shared repository mindset without using topic branch workflow, --first-parent would not help you. In your history the second parent is more likely to be the mainline. So for them "git pull" that either fast-forward when it can, or makes a merge that records the then-current state of the central shared repository, is perfectly sensible. They will view gitk and see all the changes, "git shortlog" and "git log --no-merges" will give them what they expect. > Hence my suggestion to error when "git pull" doesn't result in a > fast-forward and no branch name is specified. We could give some advice > like: > > Your local changes are not included in the local branch and you > haven't told Git how to preserve them. > > If you want to rebase your changes onto the modified upstream > branch, run: > > git pull --rebase I can parse the first paragraph above, but cannot make much sense out of it. Unless you are talking about local changes that are not committed yet, that is. But in that case I fail to see what it has to do with the current discussion, or suggestion to use rebase. >> But people need to realize that it is not solving the other half, a >> more fundamental problem some people have in their workflow. > > Yes, but some users don't realise that their workflow is broken, and > perhaps we can nudge them in the right direction. I actually avoided mentioning that deliberately, because I think the "flip the head when merging" encourages people to (1) work directly on 'master' and (2) pull too often when they shouldn't. That is detrimental if your goal is to nudge them in the right direction. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html