Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3274744
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:04:18+00:00 2026-05-17T19:04:18+00:00

In a nutshell: what are best practices for using Intellij Idea (9) and Git?

  • 0

In a nutshell: what are best practices for using Intellij Idea (9) and Git?

Context

We recently upgraded to Intellij idea version 9 and have started to use Git for a new feature on existing project.

We largely use git command line to learn the tool better. But we thought we’d pick the hive-mind to find out what are best practices for git with idea.

The Idea UI is similar for both CVS and Git, yet the underlying implementations differ a bit.

Example Questions

For example:
-With CVS, when we had multiple release of a product, each of us would have a local copy of the 1-0, 2-0, 3-0, etc. branches , each with its own Intellij files (i.e. .ipr, .iws, etc.). The “git way” seems to have one project and use ‘git branch’ to switch branches. This is fine, but it creates huge overhead for idea (as it has to reload each changed file, including checked-in jars) when you change branches. So: do you still have a separate project (with .git) for each “major release” or have one project and use “git branch”?

-Is it a good idea to use Autostash?

-Do you automatically add each modification to your git commit? or use “git add” later?

-Do you rebase?

-Best way to merge?

-Any other hints/tips/what-works-for-you,etc.

Final Comments

We still “think in cvs” so part of this is getting used to git; part is getting used to Idea’s Ui for git.

These are fairly rudimentary questions as we still use the comand line primarily. Also I’ve heard idea 10 has better/stronger/faster git integration tools

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:04:18+00:00Added an answer on May 17, 2026 at 7:04 pm

    Here’s what we’ve found after several weeks of Git/Idea. I’ve made this a community wiki. Please throw in your 2 kronor/centimos/pfennings/cents.

    Note: I’m answering my own question because I sought those easy-use bullet points.

    Presupposition

    Idea is great tool. No one here is complaining. Just observing.

    Best Practices

    • At this point (9.0.3) Git with Idea is just plain harder to use than SVN with Idea. Part stems from the complexity of Git (vs SVN), partly because Idea’s tools don’t do everything in the git world.

    • Thus you will need to use the command line

    • Idea’s merge tool works much better than command line merging or even using mergetool (using meld or mergetool). The reason: you have much more freedeom to work in the ‘idea environment’ rather than fixe one lint at a time.

    • Remember to synchronize in Idea (ctrl-alt-y) when you update the working tree from the command line

    • Watching the Git Console to learn idea’s git tricks; idea executes git commands there.( Version Control view, Console tab):

    example:

    13:30:58.234: git log -M --follow --name-only --pretty=format:%H%x00%ct%x00%an%x20%x3C%ae%x3E%x00%cn%x20%x3C%ce%x3E%x00%s%n%n%b%x00 --encoding=UTF-8 -- src/jsp/workspaces/include/edit.jsp
    13:31:02.437: cd J:\projects\PE-GIT\pe
    13:31:02.437: git annotate -p -l -t -M HEAD -- src/jsp/workspaces/include/edit.jsp
    
    • Unfortunately Idea does not have good tools for “merging conflicts in upstream commits” in 9.0.3

    Example:

    • Alice does work, commits (locally)
      file A, commits file B, commits file
      C
    • Bob does work, commits file C, commits file D, commits file E
    • Alice pushes her changes
    • Bob Pulls his changes

    Coming from CVS/SVN, I expected Ideas handy diffing tool to pop up. No. Instead git/idea throw up a red flag, I usually end up using “git mergetool” (meld od on linux, tortoiesmerge on windows).

    Note: Perhaps Idea provides a better way. Please set me straight.
    Note to the motivated: can you set up .gitconfig to use Idea’s diffing tool?

    Stashing

    • Ideas “Shelve” functionality duplicates “Git Stash”. Both seem similar. Both use patches. You probably want to use one or the other. I haven’t figured out the advantage of one or the other

    Big Old Projects

    • If you’re working on a decade old project recently migrated to Git, with jar files checked into the scm (i.e. previously checked into CVS/SVN, where log4j-1.0.jar is in BRANCH-2-0 and the mainline has log4j-9.0.jar ), PROCEED WITH CAUTION if you want to checkout “version 2.0” of your project. Idea needs to unload all the “head” jars and reload the jars-checked-in-at-2.0. This takes for-ever.

    Other little stuff

    • The idea menus/UI still shows “git init…” even though you’ve already initialized Git. It’s confusing, but ignore it.

    • You cannot have the same working tree in both Git and CVS/SVN (though the UI may seem to imply so). I/we tried this during an initial “let’s try git and still use CVS as a backup plan” phase. It didn’t work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, I have a somewhat complicated system in C++. In a nutshell, I need
In a nutshell, there's a global stylesheet: a { font-family: Arial; } I want
In a nutshell: I want to do the same thing Dependency Walker does. Is
I was reading Algorithms in a Nutshell (O'Reilly) and came across this symbol in
Here are the specs that I'm trying to implement in a nutshell: 1) Some
Here's what I've been trying to do, in a nutshell: class example <T extends
I'm looking for some help with a dependency issue. In a nutshell, I've included

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.