On Tue, Feb 4, 2025 at 8:11 PM D. Ben Knoble <ben.knoble+github@xxxxxxxxx> wrote: > > When running "git pull" with the following configuration options, we > fail to merge divergent branches: > > - pull.ff=only > - pull.rebase (unset) > - branch.<current_branch>.rebase=true > > Yet it seems that the user intended to make rebase the default for the > current branch while using --ff-only for non-rebase pulls. You make an interesting point. The idea is that more specific options override less specific options. In this case, "fast-forward only" is more specific than "rebase" (because rebasing might or might not fast-forward), but "my branch" is also more specific than "all branches". So which option should win? 🤔 On Wed, Feb 5, 2025 at 2:14 PM D. Ben Knoble <ben.knoble+github@xxxxxxxxx> wrote: > Is there, then, an existing combination that means roughly to treat > `git pull` with no other options like this: > - if not rebasing, forbid merging and be equivalent to --ff-only > - if rebasing is requested (because of branch.name.rebase or --rebase > or …?), allow it I think what we're missing is a branch.<name>.ffOnly option to make a particular branch fast-forward only. Such an option would be especially useful for the master branch, but you could set it on all of your branches except the ones that you want to rebase. We could even have a branch.autoSetupFfOnly option to turn on ffOnly automatically for new branches. -Alex