If you want to make a change that you want to merge with master, the best way is to first create a topic branch
git checkout -b foo
make a single commit with your feature
git commit -m "Made the thing X finally work"
and push that branch to review via
git push origin foo:refs/for/master/foo
Avoid working directly on master, as you will have problems resolving conflicts if someone else pushed to master before you. If you have your work on a separate branch, then resolving conflicts is as simple as
git checkout master
git pull origin master
git checkout foo
git rebase master
git push origin foo:refs/for/master/foo