Thread (1 message) 1 message, 1 author, 2023-10-26

Re: [PATCH] merge: --ff-one-only to apply FF if commit is one

From: Ruslan Yakauleu <hidden>
Date: 2023-10-26 13:40:08

 > Squash and rebase are functionally identical in this case.
Sorry, but for me `git merge --squash` doesn't work.


Currently, I have a global option --no-ff for master
$ git config branch.master.mergeoptions --no-ff
In this way `git merge --squash` crashes with message
 > fatal: options '--squash' and '--no-ff.' cannot be used together

In other way it writes something like
 > Fast-forward
 > Squash commit -- not updating HEAD
and... not updates parent branch.

For example, GitHub propose for PR's:
- Create a merge commit - the same as `git merge --no-ff`
- Rebase and merge - the same as `git rebase ...; git merge --ff-only`
- Squash AND commit - like two different operations. So after squash we
still have to merge our commit properly into parent branch.

The new option just dynamically selects between --ff and --no-ff for
`git merge`. Nothing else.

-- 
Ruslan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help