Your comment explains why this is happening:
We're simply updating files in each of our directories, pushing them as commits to the dev branch at GitHub and pulling commits from the dev branch from GitHub.
It's the pull that causes the merge commits. Presumably you are all checking out the dev
branch, making your commits, and at some point pulling the latest. When you pull commits from the remote version of your branch and you also have new commits on your local branch, the default setting in Git will create a merge commit.
To avoid it, you have a few options:
- When pulling, use
git pull --rebase
. This will rebase your local commits onto the latest version of dev
instead of creating a merge commit. If this is the way you decide to go, you can have everyone configure this to happen automatically.
- Don't pull anymore. If you want to update your local copy of
dev
, first do git fetch
followed by git rebase origin/dev
. The outcome is the same as #1, but this makes it more obvious that you are doing it.
- Similar to #2, you could start using separate branches instead of everyone working on
dev
. Before you merge into dev
, do a git fetch
followed by git rebase origin/dev
.
Number 3 is probably the best way to go, but is a slightly more complicated workflow. But it enables task switching if you want to work on different things at the same time.
no-ff
, ormerge.ff
is false in the config. It looks like you're using some kind of UI wrapper around git, so you'll need to check its documentation for merge configuration.git pull --no-ff
or haspull.ff
configured to false.