git checkout master git checkout -b feature/foo # make some commits git rebase master git checkout master git merge --ff-only feature/foo