I work as a developer in an Agile software development team. We have a single origin repo containing the master branch and a number of 'live' feature branches. Our working practice is to create a feature branch for each story from master, finish the work, run it by QA and the POs before raising a PR after which it's merged into the master branch and the feature branch is destroyed in origin.
Sometimes I'm working on a story and it's temporarily blocked for some reason. Normally I would commit or stash my changes, then checkout a different branch, rebuild etc. and start working on that. However, it would be much more convenient if I could have two (or more) instances of Visual Studio working on different branches, so that I could swap between them without committing/stashing etc.
Is this possible?
CodePudding user response:
There are options.
- Clone the repo twice to a different location in disk and open each location in a different VS instance.
- Use
Git worktree
to add a 2nd working folder to your existing clone
CodePudding user response:
If you have a single instance of repo, then it is not possible to be in two different branches at the same time(which I think you are already aware of).
I would suggest you to create two instances of the same repo and open them in two instances of VS code and then you can open the two branches needed at the same time.