Forum Discussion
Best practice advice for branching. Need some advice.
Hi All,
I have a question that I'd love to get some feedback on. I know that in general, keeping the number of active branches to a minimum is recommended, but what is the proper policy for having branches for individual projects?
Right now, we have one Dev branch and one Production branch. When I work on a minor change request that only takes a few hours, I don't create a new branch. When I work on a big project (multi-week), I shelve/stash the changes and not create a new branch. According to the ALM and branching strategy docs I've read, creating a feature branch for every project I'm working on and then deleting it after I've merged it back to the Dev branch is NOT the right technique, but it certainly seems reasonable that I'm reading too much into it.
Am I wrong in this assumption? Is it legitimate to create a new feature branch for every one of my projects as every other developer in my company would for whatever long term project they are working on as well?
Current process
- Begin working on the code changes.
- Use the VS Shelve/Stash feature regularly to back up the changes
- Continue working the next day
- Rinse and repeat
- When project is done, check in to Dev
What I'm wondering about
- Create a feature branch /TFS/Features/Jason/ProjectXYZ
- Begin working on the code changes
- Check into the feature branch whenever
- Reverse integrate as necessary from Dev to Feature/Jason/ProjectXYZ
- When the project is done, merge from Feature/Jason/ProjectXYZ to Dev.
Any feedback would be appreciated. What's usually the best practice scenario for this sort of thing?