Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Always merge with `ff = only` #129

Closed
wants to merge 1 commit into from

2 participants

@croaky
Owner

@jferris:

This has the effect that Git will never implicitly do a merge commit,
including while doing git pull. If I'm unexpectedly out of sync when I git
pull, I get this message:

fatal: Not possible to fast-forward, aborting.

At that point, I know that I've forgotten to do something in my normal
workflow, and I retrace my steps.

@gylaz:

I like the value of seeing a failure message if a pull (or just merge) fails
due to not being able to get fast-forwarded. Then I can look to see whose
changes went out, that I may have not expected to be there.

@croaky croaky Always merge with `ff = only`
@jferris:

This has the effect that Git will never implicitly do a merge commit,
including while doing git pull. If I'm unexpectedly out of sync when I
git pull, I get this message:

> fatal: Not possible to fast-forward, aborting.

At that point, I know that I've forgotten to do something in my normal
workflow, and I retrace my steps.

@gylaz:

I like the value of seeing a failure message if a pull (or just merge)
fails due to not being able to get fast-forwarded. Then I can look to
see whose changes went out, that I may have not expected to be there.
af647cd
@jferris
Owner

This looks good to me.

@croaky
Owner

Thanks, @jferris. Merged.

@croaky croaky closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 6, 2013
  1. @croaky

    Always merge with `ff = only`

    croaky authored
    @jferris:
    
    This has the effect that Git will never implicitly do a merge commit,
    including while doing git pull. If I'm unexpectedly out of sync when I
    git pull, I get this message:
    
    > fatal: Not possible to fast-forward, aborting.
    
    At that point, I know that I've forgotten to do something in my normal
    workflow, and I retrace my steps.
    
    @gylaz:
    
    I like the value of seeing a failure message if a pull (or just merge)
    fails due to not being able to get fast-forwarded. Then I can look to
    see whose changes went out, that I may have not expected to be there.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 gitconfig
View
4 gitconfig
@@ -13,9 +13,11 @@
co = checkout
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git remote prune origin && git branch -D $1' -
- merge-branch = !git checkout master && git merge @{-1} --ff-only
+ merge-branch = !git checkout master && git merge @{-1}
rebase-origin = !git fetch origin && git rebase origin/master
st = status
[core]
excludesfile = ~/.gitignore
autocrlf = input
+[merge]
+ ff = only
Something went wrong with that request. Please try again.