Will using the flags -S -no-ff during merge do what I think

Hi,

I was wondering if you guys could tell me if I could do this while merging branches.

git merge -S -no-ff branch name

I think the above command should do this:

1: begin the merge process
2: sign the merge commit message with my gpg key
3: keep all commit messages made to branch being merged prior to merge

Will it do what I think it will.do?

Cheers
Jay

I believe item 3 is more along the lines of “will create a merge commit even if the commits on the target branch are all descended from the commit pointed to by HEAD”. From the documentation:

Create a merge commit even when the merge resolves as a fast-forward.

The git merge command is designed to merge two branches back into one, so it typically shouldn’t have anything to do with commit messages (other than the one on the merge commit, if any).

1 Like

that makes sense actaually.  I just got a little confused about maintaing commit messages for each file in a certain branch after said branch had been merged back into the default branch (or working branch as they case me be).