Open two GIT branches in two separate IDE instances?

We are moving from Mercurial to GIT.

With Mercurial, we have separate repositories compared to a single repo with separate branches in GIT.

Thus, Mercurial can easily open two separate repositories in two separate instances of your IDE. How can you do this with GIT, since there is (I believe) only one branching current at a time in the GIT repository

Note: this similar ticket refers to opening two branches in the same IDE. The difference with this question is that we are pleased to open them in two separate IDE instances. Although I suppose the answer is the same - you cannot do this.

+6
source share
3 answers

You are right: only one active branch at a time. The best you can do is to clone the repository twice on your local computer into two different directories, and then simply open the corresponding directory in each instance of the IDE.

+9
source

After creating the two clones, as David Deutsch proposed, I recommend selecting it as the primary one and creating a symbolic link to the .idea directory from the secondary clone to the primary clone. This way you will have the same configuration in all clones.

ln -s primary_clone/.idea secondary_clone/.idea 

It is assumed that you are using the .idea project configuration format and that you are not checking the configuration in the repository (in this case, you are obviously all configured from get go)

it works mostly, only sometimes Idea offers you a dialog box for reloading other projects if you change some settings in the current active one. However, you can refuse.

+3
source

I agree with David to work with two branches at the same time, the only solution I found is to clone the repository twice and put them in another directory.

-1
source

Source: https://habr.com/ru/post/989539/


All Articles