Another reason why Git is cool - No Fluff Just Stuff

Another reason why Git is cool

Posted by: Pratik Patel on January 2, 2009

So I'm working on migrating back to Intellij to do some Groovy/Grails stuff (from Netbeans, but that's another long blog post if you're really interested).... I quickly realized the path-of-least-resistance was to just create a new Intellij project and copy over the stuff in the source folders. Since I was migrating from Grails 1.0.4 to 1.1Beta2 anyways I figured I'd clean up some cruft as well.

My main concern was how to re-sync with the existing Git remote repository I have hosting my project at Assembla's Git repo. I'm used to Subversion, which has those .svn directories in every sub-directory underneath your project root. I started mentally constructing a "find -name .git -exec mv ..." command in my brain. I found only one .git directory at the root of my project. I figured "what the hell, I'll just move the old .git dir into the new project dir and roll the dice."

git status
git commit .
git push

Done! Very nice indeed. For those running on Mac OSX here's a useful link for setting up a global .gitignore for those pesky .DS_Store files.
Also, here's a link for setting up a .gitignore for a Grails application.


Pratik Patel

About Pratik Patel

Pratik Patel is a Java Champion and developer advocate at Azul Systems and has written 3 books on programming (Java, Cloud and OSS). An all around software and hardware nerd with experience in the healthcare, telecom, financial services, and startup sectors. He's also a co-organizer of the Atlanta Java User Group and North Atlanta JavaScript meetup, frequent speaker at tech events, and master builder of nachos.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »