After the first release of our product, we will be switching to a different branches for the main development and feature development. Is there a way to create a branch in such
I have a git branch model which has dev/master/production branches used for staged deployments, so there are branches that I want protected against deletion. I use pull requests and Visual Studio Team Services, so after each pull request from dev to master for example, VSTS would ask if I would like to delete the source branch (dev).
I was worried about a developer accidentally deleting dev or another important branch which is used for deployments so I used this hack:
I created a branch off of dev called "save", made a one line change, opened a pull request against dev, and just leave it open.
As long as there is an open pull request against dev, dev cannot be deleted and VSTS will not ask if I would like to delete the branch.
If there is any other more official solution to this problem, I'd be happy to use it. But for now, this was easy and works.