I have come to the git party a little late and I have a simple problem.
I have three feature experiments in development that are currently on my master branch. The features could be called postits, auth, and uploads.
When I do git status
on my master branch, I get a list of ~10 entries in 'changed but not updated' and ~15 in 'untracked files'. All these entries belong to one of the three feature experiments.
How can I move these entries into three new feature branches so I can have a clean working directory again?
They're unnecessary. In most cases, branches, especially branches that were related to a pull request that has since been accepted, serve no purpose. They're clutter. They don't add any significant technical overhead, but they make it more difficult for humans to work with lists of branches in the repository.
$ git checkout -b postits # create postits branch based on the current master
$ git add X Y Z # add your parts, maybe with -p to get parts of files
$ git commit # commit to postits branch
$ git checkout -b auth master # make branch based on master (not including postits)
$ # etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With