Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import an existing Git repository into IntelliJ IDEA

I have a local Git repository with my own branches, stashes and all that jazz, and I'd like to add this repository into IntelliJ IDEA, so that I can manage it, instead of creating a new copy of the repository from within IDEA. How do I do that?

Thanks!

like image 695
vatzec Avatar asked Mar 22 '13 13:03

vatzec


People also ask

How do I import an existing module into IntelliJ?

Import an existing moduleFrom the main menu, select File | New | Module from Existing Sources. In the dialog that opens, specify the path the . iml file of the module that you want to import, and click Open. By doing so, you are attaching another module to the project without physically moving any files.


1 Answers

You can actually use an existing repo. Just go to Open and open the directory that you want to be your root. Then select the git repo directory, go to the VCS menu, and select Enable Version Control Integration.

That's all it took me. That was how easy it was on a Mac. Not sure if the flow is exactly the same on other platforms.

like image 53
Cari Avatar answered Sep 18 '22 16:09

Cari