Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to merge branches with --no-ff flag using SourceTree?

Dmytro Shchurov July 9, 2014

Browsed the knowledge base, read documentation, tried to find such option in the application, but without success.
I need to merge branches with no fast forward option. Please help me to avoid using console every time I have to merge them )

4 answers

1 accepted

14 votes
Answer accepted
Louis des Landes January 20, 2015

Preferences for git has an option

"Do not fast forward when merging, always create commit"

Dmitri Shchurov January 21, 2015

This is what I'm looking for! It's so sad that I cannot give you an 'answer' point.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2015

You can accept multiple answers.

Dmytro Shchurov January 21, 2015

Another me sees this option -) I asked from my personal account, but then continued with my company one. But the answer is still can be assigned only to a single coment.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2015

In the old Answers it was possible to accept two answers, maybe not in the new one.

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2014

Another possibility (if this is really missing form the Mac version) is to create a custom action to do this.

Dmytro Shchurov July 9, 2014

Oh! I've really missed it! This might help. Thank you.

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2014

In the "Confirm merge" dialog, there is a checkbox: "Create a new commit even if fast-forward is possible". If you leave this unchecked, it uses --no-ff.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2014

I think you mean, "if you check this". Unchecked = "FF if possible", Checked = "Never FF".

Dmytro Shchurov July 9, 2014

Thank you friends, but there is no such option on the 'Confirm' dialog in Mac OS X version (1.9.5).

There are only 'Commit...' and 'Include messages...' check boxes there.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2014

Yes, you are right. Checked => -no-ff

0 votes
dpstandish September 14, 2017

They still don't seem to have this in mac version.

This script works as custom action:

#!/bin/bash

branch_name=$(egrep -lir $1 .git/refs/heads/feature/* |head -1|sed -e 's/.git\/refs\/heads\///')

git merge $branch_name --no-ff --no-edit

If you have multiple branches at that commit, behavior is uncertain.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events