How do pull no fast-forward in TortoiseGit
Asked Answered
C

1

2

Since some people recommend no fast-fordward (--no-ff) on merges in Git, I wanted to do that. But I can't see where to check to enable that in the TortoiseGit GUI.

Yes, I could do this from the command line. But others in the group won't use it, so I need a GUI solution.

EDIT: removed push from question; it is not realistic as pointed out below. The references were to pulls only.

Chaisson answered 1/8, 2011 at 0:41 Comment(2)
Beware of the no-ff option: it will create "checkpoint commits" that will break any bisect or blame attempt. See sandofsky.com/blog/git-workflow.htmlDebbee
As I understand it, it doesn't create them. It just leaves them in if you created them yourself. If you ensure that every commit has the code at a usable state then there should be no problem here.Cannabin
C
4

Where do you search for it? When selecting TortoiseGit -> Merge menu item I get dialog shown below. I can't believe that you missed "No Fast Forward" check box on it :)

enter image description here

For pull there's no such option in TortoiseGit, but you can do fetch and then merge with 'No Fast Forward' option from the GUI manually. Net result would be the same.

Chalaza answered 1/8, 2011 at 0:58 Comment(5)
How about on push and pull, however?Chaisson
@Brian: push doesn't have that option even on command-line. Do you really need new merge commit each time you do pull? Why? For merge I can understand your concern, but for pull... Could you explain, please?Chalaza
@Brian: It seems that for pull TortoiseGit doesn't have such option, but you could always do fetch and then merge with no-ff option - both from the GUI.Chalaza
put that comment about fetch, then merge in the answer so it is easier for others to find. Then I will accept that answer.Chaisson
@Brian: added to answer. I think that it is almost equally easy to find details in comments though :)Chalaza

© 2022 - 2024 — McMap. All rights reserved.