git merge - What does git pull --rebase --ff-only do? -
i saw command line reference recommended git pull --rebase --ff-only. thought git reject that, doesn’t.
what combination of --rebase --ff-only mean?
edit: know each alone does.
[edit, 4 dec 2016: of git version 2.6, git pull no longer script, no longer easy see , technical details below no longer apply. --ff-only still useful when merging, not when rebasing.]
the git pull script (you can view yourself, e.g., less $(git --exec-path)/pull) separates out --ff-only variable named $ff_only subsequently ignores entirely if winds doing rebase:
case "$rebase" in true) eval="git-rebase $diffstat $strategy_args $merge_args $rebase_args $verbosity" eval="$eval $gpg_sign_args" eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}" ;; *) eval="git-merge $diffstat $no_commit $verify_signatures $edit $squash $no_ff $ff_only" eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress" eval="$eval $gpg_sign_args" eval="$eval fetch_head" ;; esac eval "exec $eval" what means in end --ff-only option gets ignored.
it's possible in future, git might reject these incompatible, it's wiser leave out explicit --ff-only when using explicit --rebase.
Comments
Post a Comment