Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding GIT support to existing project in IntelliJ IDEA

I have multi-module project built with Maven. I imported only single sub-module (not parent) from that project as IDEA project, and looks like IDE doesn't recognize .git folder (because it is one level up from project root I used to import, I guess)

Is there still a possibility to add Git support for intelliJ somehow?

like image 728
jdevelop Avatar asked Jan 04 '12 09:01

jdevelop


People also ask

Does IntelliJ IDEA support Git?

IntelliJ IDEA supports Git from the Windows Subsystem for Linux 2 (WSL2), which is available in Windows 10 version 2004. If Git is not installed on Windows, IntelliJ IDEA searches for Git in WSL and uses it from there.

How do I get Git options in IntelliJ?

One way to open the Git tool window is to hover over the quick access button in the bottom left of the IntelliJ IDEA window, and select Git. This will open the Git Log tool window. Alternatively, you can use ⌘9 (macOS), or Alt+9 (Windows/Linux), to open the Git Log tool window.

How do I add an existing project to GitHub IntelliJ?

We can use IntelliJ IDEA to share this project on GitHub, we can go to the VCS menu and select Share project on GitHub. If we're not already logged in to GitHub via IntelliJ IDEA, we'll be shown a log in dialog where we can enter our GitHub username and password.


2 Answers

I have successfully opened a Maven subproject within IDEA. Naturally, it hasn't enabled Git integration automatically. From VCS menu I have selected "Enable Version Control Integration" and chose "Git" from submenu.

Then IDEA complained that there is no .git folder within the project and offered to select parent .git folder. I did it and everything worked as expected.

If you don't have Git option in VCS menu, this might be a bug. Try to disable SVN plugin and see if that helps (I don't have SVN plugin in my IDEA).

like image 64
Alexander Temerev Avatar answered Oct 14 '22 16:10

Alexander Temerev


You may need to add git to the list of version control in the settings

settings > Version Control

then make sure that git is listed in the table as a VCS

I had to do this otherwise git wasn't listed in the VCS menu in the menu bar.

Make sure Git is in one of the columns here

like image 36
user830914 Avatar answered Oct 14 '22 17:10

user830914