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
Use rebase option whenever you pull from remote repository. Please follow the below steps,
git pull --rebase <remote-name> <branch-name>
.The usual strategy is to work on a branch. When the remote master changes, pull the changes to master and instead of merging, rebase the branch.
See Git Rebase at Atlassian.
When you have uncommitted changes, you can do,
git stash
git pull --rebase <remote> <branch>
git stash pop
You can run
git config --global branch.autosetuprebase always
to make git pull --rebase
the default behaviour for git pull.