so let's say I have two branches develop
and feature
, and feature
branch is ahead on two extra commits.
I'm looking for some kind of following behaviour
$ git checkout develop
$ git merge feature
Error: make sure you squash all commits in `feature` branch before merging it
Maybe it's possible to configure on github side? To make github reject git push origin develop
when develop
has couple commits from feature
branch.
To make question more clear I will provide an example.
// 1. working on a new feature
$ git checkout -b feature
$ git commit -m "foo"
$ git commit -m "bar"
// 2. merging to develop
// here I supposed to do `git rebase -i develop`
// but I forgot!!!!
$ git checkout develop
$ git merge feature
// 3. push to github
$ git push origin develop
I wish I would get some warning on step 2
or step 3
, because I forget to squash commits