I'm having a little problem with my colleagues and my commit history becoming unnecessary complicated when working on the same project. The problem is git pull merging non-ff if there is just a single commit difference etc. So I like to fail the git pull if a ff is not possible so that the developer can look at the commits and figure out if a merge or a rebase is more appropriate.
My question: is there a way to set --ff-only by default for all git pull commands on any branch but not for git merge? I'm aware of aliases, but that is not what I'm looking for.
Aliases can sorta do what you need, but I'd have to agree with Christopher that you shouldn't have to be dealing with this in the first place.
Git makes branching easy, so if you want to share some code with people before its ready to merge, push to a branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With