4

I have heard from my peers on more than one occasion that it is "advised" not to do version controlling of your code from within the IDE where you write it. I have seen them developing on Eclipse, IntelliJ IDEA, etc. but doing version control (in my current scenario - Git) from command-line or standalone clients as opposed to using the corresponding plugins readily available for the IDE.

Though I have used version control plugins in Eclipse and never found any issues, I would like to know what is the general norm and why?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
BipinK
  • 125
  • 7
  • 2
    The VCS are most of the time very capable but I still tend to use the CLI for most of my GIT operations. I feel that I have more control of what I am doing when using the CLI. But it is probably just a feeling and not a rational decision. – maba Oct 14 '13 at 10:38

3 Answers3

4

I don't think that there's a general norm. The answer to the question is highly subjective.

I personally don't use any IDE integration (not even a GUI tool, except the builtin ones git gui and gitk) because my experience told me that these tools behave different than the command line version and/or don't provide the full functionality available on the command line:

Another thing is that your knowledge about your versioning tools is bound to your IDE. Maybe you want to set up some version management for other things than the sources you edit with Eclipse (your dotfiles, for example).

Or one day you switch your IDE, drop Eclipse and start using Visual Studio. Then you don't have to learn only Visual Studio but in addition you need to learn the Git integration in VS too.

I think compared with what I've written above, there are no serious advantages that would legitimate the usage of version control tools from inside the IDE.

So, IMO, it's a bad practice to do version control from inside the IDE and it should always be done from the outside.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
eckes
  • 64,417
  • 29
  • 168
  • 201
2

You should always try to use the right tool for the job, and that is a personal question so there is no "norm" or "good practice".

In my case I prefer to use a ...

  • GUI, like Sourcetree, for viewing logs, diffs, staging/discarding lots of files, staging/discarding hunks, etc.
  • CLI for modifying remotes, squashing commits, pushing, cloning, etc.

Also, if you plan to break out of the box a little bit, it wouldn't hurt to know a little bit about the Git internals.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Emil Davtyan
  • 13,808
  • 5
  • 44
  • 66
1

Those plugins and add-ones tend to sometime do things that otherwise you wouldn't do if you were using the native (CLI?) client.

For example, if you were working with an Eclipse + ClearCase plugin, any change in a file, even adding a new line, will initiate a check-out operation (depending on the configuration).

Specifically for Git, you should be aware of its internals to properly work with it. Using the IDE hides those things from you. In normal trivial operations, it will work. But, when you are facing a source control issue (ugly merge, cherry-picking, rebase conflicts) you will have to go to the CLI to resolve, but then you have no idea what were the actual commands that the IDE ran that got you to this situation in the first place (plus you have no experience with the CLI at that point).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Elad Tabak
  • 2,317
  • 4
  • 23
  • 33