I use it for critical website maintenance. I'm the sole developer yet I have a master, develop and issue branches.
My work process for site setup looks like this:
Make workable master branch. Do initial commit.
Checkout develop branch. Don't do anything, develop functions as a test buffer for merging into master.
Checkout issue branch. Code your issue, when it's done, pull it into develop, see if any issues arise, merge conflicts etc... fix those.
When enough issues are merged into develop for a release and develop has been tested for stability, pull develop into master.
Develop - E
/ | \ \
A B C D
That way you get a full testing collection in develop, where you can test stability, issues, etc... without having to risk hurting Master and having to roll back commits if they were harmful.
Also, by using individual branches for committing, you can "leave" work you already did, start fresh on something else to fix an more urgent issue and roll that out sooner.
In real life I usually have one issue branch, and pull that one in develop and then into master. Sometimes it's tedious, but once every two months at least I have to drop work at the drop of a hat because someone had an idea that I have to make RightNow™ and that way I can quickly switch back to a base state, make the thing and then afterwards continue where I was. Especially with large projects that take multiple weeks this is a godsent that I can quickly switch branches.
Consider this scenario: You always work on a main branch and you have AwesomeCodeThing™ in the works that leaves your Master branch in open heart surgery and a YugeBug™ pops up that needs urgent fixing otherwise thousands of users will complain to you about BigProblems™
The only way to quickly resolve your issue in such a scenario,
- check your previous commits,
- see when your last stable commit was(cursing is optional)
- roll back to that commit
- make fix, push fix out to production
- solve all the conflicts and problems you now have trying to get back to AwesomeCodeThing™ status
- give up, cry and start work over.(optional)
If you use branches:
- Checkout master
- create branch UrgentFix™ and fix stuff
- pull UrgentFix™ into master
- push to production
- Merge master into develop
- Merge develop into AwesomeCodeThing™
- get a beer and continue working.