Another reason why Git is cool

Posted by: Pratik Patel on 01/02/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.



About Pratik Patel

Pratik Patel

Pratik Patel is the CTO of Atlanta based TripLingo (http://www.triplingo.com/). He wrote the first book on 'enterprise Java' in 1996, "Java Database Programming with JDBC." He has also spoken at various conferences and participates in several local tech groups and startup groups. He's in the startup world now and hacks iOS, Android, HTML5, CSS3, JavaScript, Rails, and ..... well everything except Perl.

Pratik's specialty is in large-scale applications for mission-critical and mobile applications use. He has designed and built applications in the retail, health care, financial services, and telecoms sectors. Pratik holds a master's in Biomedical Engineering from UNC, has worked in places such as New York, London, and Hong Kong, and currently lives in Atlanta, GA.

More About Pratik »

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 7
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 3
  • Automation Tools: Git, Hudson, Sonar
  • HTML5, Ajax, jQuery, Usability
  • Mobile Applications - iPhone and Android
  • More...
Learn More »

NFJS, the Magazine

December Issue Now Available
  • BDD and REST

    by Brian Sletten
  • Mocks and Stubs in Groovy Tests

    by Kenneth Kousen
  • Algorithms for Better Text Search Results

    by John Griffin
  • Knowns and Unknowns of Scrum and Agile

    by Brian Tarbox
Learn More »