I'm using using Git-Stash for a project and trying to always rebase before merging a feature
branch to develop
branch, in order to keep develop
clean, but occasionally I forgot to rebase, is there any way, locally or remotely, that I can prevent this?
A simple logic in my mind is that, if there's any other commits in between the commits on my feature branch, then it needs rebase, but not sure where to go from here.
git config ff.merge only
. Add --system
or --global
according to the need.
The config disables any true merge. It allows fast-forward merge or rebase only.