and remember this is much better than git pull master
on a feature branch:
# use git pull on in master branch! so it will never create nasty merge commits
git checkout master
git pull origin master
# development
git checkout -b your_feature_branch
# rebase your changes over changed master:
# first squash, modify, cleanup your changes if needed (less uneeded commits, less conflicts)
git rebase --interactive first-commit-id-you-dont-want-to-touch-anymore
# rebase over master, so your changes will look as if you started them right now
git rebase master
git push your_stuff
# another good friend is cherry-pick
git checkout -b your_new_feature_branch
git cherry-pick one-commit-id-which-you-want-to-pick
see https://www.atlassian.com/git/tutorials/rewriting-history https://help.github.com/articles/about-git-rebase/