null
null

Reputation: 3517

Git, IntelliJ & Atom combination

I'm learning git in preparation of a new role that I'll soon be starting. Previously I've only used shoddy VCS systems and shoddier IDE's, I'm a little overwhelmed by the options available to me :)

For the tutorials I've been using Atom text editor and Git from terminal. Both are working fine for the examples but I began wondering where IntelliJ fits into this. It clearly has Git integration and support so would using the IDE built in features negate the use of Atom?

I have a local repo in folder x, if I then clone this repo using IDEA and set the parent directory to be in my DevWorkspace I lose the .git files and tracking. If I clone and set the working directory to be folder x I'm worried that that would be going against the grain.

Trying to associate this with a real world example, I'd imagine a network repo that I'd clone, make local changes and then add / commit. But where does Atom/intelliJ come into this?

If I use the command line to clone then does IDEA simply open the files in that project? Atom is a useful editor but I suspect it may be redundant if the IDE is used properly and efficiently, can anyone advise?

Many thanks.

Upvotes: 0

Views: 2202

Answers (1)

Darek Kay
Darek Kay

Reputation: 16669

First of all, Atom is an editor, IntelliJ is an IDE. This leads to the usual pros and cons (like features vs simplicity/performance) in any IDE/editor war, which is highly subjective and hence not a topic for SO.

If you already have a local repo, you don't really need to clone it to import it into IntelliJ (unless that's your workflow). Just use File > New > Project from Existing Sources (IDEA 14.1.3+, it may differ in older versions) to create a project in your local repository. IntelliJ will automatically detect a Git repository and show you a confirmation popup. You can either confirm it or set the root later in Settings > Version Control. This will tell IntelliJ to enable Git integration for your project. Now you can use many Git actions right from your IDE, under VCS and VCS > Git. You can also see your repository tree by selecting Version Control tab in the bottom panel or pressing Alt + 9.

For full Git integration documentation check the IntelliJ IDEA Web Help for Git and Version Control.

Regarding your real world example, you can clone any repository (local or remote) by selecting File > Project from Version Control > Git/Github (again, it might differ in IDEA < 14.1.3). IntelliJ will offer to create a new project for this repository. This is equal to clone a repository using Git in command line and creating a project from existing sources as described earlier.

Upvotes: 3

Related Questions