I have a git branch called
There are a few different ways to do this, but here is what I would suggest.
First, create and switch to your first branch.
git checkout -b upload_photos_feature
Next, find the commit where you branched
shared_pictures_feature off of. I would suggest reading this StackOverflow question for details on how to do that. Then, in order to uncommit all of your files in that branch, you will want to do:
git reset --mixed <parent commit of both branches>
The next step will be to commit the relevant files. Just add and commit the files that you want in your
upload_photos_feature branch, leaving the rest untouched.
Now, you will want to switch back to your original branch and restore the state you were in before.
git reset --hard HEAD git checkout shared_pictures_feature
Now, you will want to go through those steps again for each new branch. Just make sure that you do the first step of creating the new branch each time since you don't want to lose anything on