Note: Earlier versions of Visual Studio does not know how to treat additional work trees, and will not recognise them as git repositories. This will create a new directory "C:\projects\the_project_2") and checkout the branch into it, without having to re-clone the repository.įor more information see the git worktree documentation. Where is the branch you want checked out in the new work tree. You can always change the location in Tools -> Options -> Web -> Open In Visual Studio Code. a prompt will ask for the path to Code.exe. Let's say you have C:\projects\the_project and you want to make a new work tree at e.g, C:\projects\the_project_2, open git bash, navigate to the project's directory and run You can open any solution, project, folder or file in Visual Studio Code by simply right-clicking it in Solution Explorer and select Open in Visual Studio Code. You can then open that work tree in visual studio to have two different branches checked out. With git you can only have one branch checked out at a time, but wait there is a solution!īy utilising the git worktree command, you can create a second worktree for the same repository in a different directory. To open a second instance of the integrated development environment (IDE), right-click on the Visual Studio icon in your dock or Applications folder, and select New Instance. When you check out a branch in git, it places that branch into your working tree or (file structure, whatever you wish to call it). The issue here isn't to do with Visual studio, but how Git works.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |