Skip to content
  • Stephen Haberman's avatar
    pull: allow pull to preserve merges when rebasing · 66713ef3
    Stephen Haberman authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    If a user is working on master, and has merged in their feature branch, but now
    has to "git pull" because master moved, with pull.rebase their feature branch
    will be flattened into master.
    
    This is because "git pull" currently does not know about rebase's preserve
    merges flag, which would avoid this behavior, as it would instead replay just
    the merge commit of the feature branch onto the new master, and not replay each
    individual commit in the feature branch.
    
    Add a --rebase=preserve option, which will pass along --preserve-merges to
    rebase.
    
    Also add 'preserve' to the allowed values for the pull.rebase config setting.
    
    Signed-off-by: default avatarStephen Haberman <stephen@exigencecorp.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    66713ef3