# get the latest version
git checkout master
git pull
# create a new branch and switch to the new branch
git branch my-new-branch-for-awesome-feature
git checkout my-new-branch-for-awesome-feature
Add, modify, delete files
# finalize your new branch
git add *
git commit -m "awesome feature"
# switch to the master branch and update it
git checkout master
git pull
# switch back to your new branch and make its base the same as master
git checkout my-new-branch-for-awesome-feature
git rebase master
# you will be sure that your branch is so updated
git push -u origin my-new-branch-for-awesome-feature