title: Best Practices for using Git with Intellij Idea
body: <p>In a nutshell: what are best practices for using Intellij Idea (9) and Git?</p>
  
  <p><strong>Context</strong></p>
  
  <p>We recently upgraded to Intellij idea version 9 and have started to use Git for a new feature on existing project.  </p>
  
  <p>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.</p>
  
  <p>The Idea UI is similar for both CVS and Git, yet the underlying implementations differ a bit.</p>
  
  <p><strong>Example Questions</strong></p>
  
  <p>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"?</p>
  
  <p>-Is it a good idea to use Autostash?</p>
  
  <p>-Do you automatically add each modification to your git commit? or use "git add" later?</p>
  
  <p>-Do you rebase?</p>
  
  <p>-Best way to merge?</p>
  
  <p>-Any other hints/tips/what-works-for-you,etc.</p>
  
  <p><strong>Final Comments</strong></p>
  
  <p>We still "think in cvs"  so part of this is getting used to git; part is getting used to Idea's Ui for git. </p>
  
  <p>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</p>
  
  <p>Thanks</p>