git checkout -b my_feature_branch
The branch is an exact clone of what master was when you ran the command.
Work as usual, however all edits will live in that feature branch only -- they won't affect master.
-
And you'll be back on the main branch with no changes
-
To get back to your feature branch:
git checkout my_feature_branch
On the my_feature_branch
branch:
git add -A
git commit -m "message goes here"
then to merge in the changes from the jamie branch:
git checkout master to switch back to the master branch
git merge my_feature_branch
You've successfully merged in your feature branch changes. At this point you can leave your feature branch in the git repo, or delete it to merge the history back into master.
git branch -d my_feature_branch