I have a repository and some local changes to commit. Before committing, I pulled the changes onto my local using Egit in Eclipse.
It creates a merge commit and I submit my commit over it.
Now when I am trying to push to origin, it is showing that it will push my commit as well as merge commit. But ideally, merge commit should not be a part of remote repository.
How to avoid this?
Use rebase option whenever you pull from remote repository. Please follow the below steps,
git pull --rebase <remote-name> <branch-name>
.