I would be interested in both general case and more specific answers, but some relevant factors in my particular case are:
- I'm currently the lone developer on this project, but might be collaborating with another in the near future
- I'm attempting to follow this workflow, more-or-less.
- In particular regard to the previous point, two branches (master and develop) have remotes, other branches created for hotfixes, bugs, and features are local-only
- The repo is easy to clone and run/develop/test multiple instances of locally
On a day-to-day basis, I'm frequently working on several branches concurrently. Much of this work isn't immediately committable, so I'm currently using git stash
to save work between branch switches. However, I'm finding working with stashes a bit fiddly and wondering if a clone-per-branch approach might be easier to keep track of. What are the advantages/disadvantages of each, and does anyone strongly recommending one approach over the other?
UPDATE: I should add that my reluctance to keep all branches constantly committed is because of an aversion to having broken or really bad code in the repo. I realise, however, that it might be wise to revise this principle, especially if I gain familiarity with the git tools to mitigate any negative side-effects.