CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

I finally get Git

Last week I listened to Scott "blogs are obsolete" Bellware expound on the virtues of Git and distributed source control.  I nodded politely and thought to myself that good ol' centralized Subversion doesn't cause me the slightest bit of pain and very little friction.  Until this week that is. 

I'm on a 2-3 week vacation before starting my new job next month.  I did about 2-3 days of significant architectural cleanup and refactoring to the StructureMap codebase while at my grandparents' farm in Missouri.  Needless to say, I couldn't commit the changes into the SVN repository on Sourceforge after each successful refactoring because I wasn't even in the vicinity of anything resembling internet connectivity. I finally had to drive into the big town just to find a wireless connection to get the changes checked in before I did something catastrophic to the codebase.

I think I'll consider moving StructureMap into Git for local versioning pretty soon just for this scenario. 

 

 



Comments

Jake Good said:

Welcome to Git :) You'll soon notice how much more rad it is...

# May 15, 2008 2:21 PM

Rod Paddock [MVP] said:

Jeremy,

 Couldn't you just install a local repository, commit to that repository and then re-commit your changes to the master repository when you got back online ?

# May 15, 2008 2:34 PM

Mark said:

That's great to hear!  I have been using git for some time (msysGit) and while git-svn is slow (really slow), apart from that I love it.  It really gives a freedom to safely experiment.  You are going to love the cheap branches, shelving, small repo size, etc.

And if you are going to consider using a public git repository for StructureMap might I suggest github.  The ability for people to clone your public repo, make changes in "their" repo and then request you do a pull back to your 'official' repo is just too slick.

# May 15, 2008 2:36 PM

Nick Parker said:

Jeremy,

I'd second the git-svn command, this would at least give you everything you need via the git-svn dcommit command until you are able to move the StructureMap repository over to git.  I'd like to hear the migration story from svn to git, I have yet to do that one myself.

# May 15, 2008 2:56 PM

shawn said:

my advice would be to keep mercurial in mind as well. in my (admittedly limited) experience, it's a lot easier to deal with on windows than git.

the story may well have changed though, so i dont think starting with git is the wrong move at all.

# May 15, 2008 3:33 PM

Steven Harman said:

re: git-svn

I've found the following guide to using Git + SVN to be pretty helpful for getting my head around how the two interact. quirkygba.blogspot.com/.../using-git-with-google-code-hosting.html

# May 15, 2008 4:53 PM

Mark said:

I have used mercurial and git, mercurial for more than a year.  I have moved over to git.

The big problem with mercurial in my mind at the time I was using it was the way it did branching.  A branch was a totally separate working copy, effectivly a separate checkout of everything.  When I needed to spike something simple I would have to clone and and then remember to take that copy with me.  It got to be just to much work.

Git is a single repo, with multiple branches (actually just tagged revisions with a particular history).  In all fairness, mercurial may have done something to allow multiple heads (branches) in the same repo but I moved away from it more than a year ago and never looked back.

As for working with git on windows, just install the msysGit installer and open a command line (regular cmd.exe if you have installed it into your path) and have at it.  I use powershell myself but it still works great and I never have to worry about the "msys" part of it because its totally self contained.  And it works on Vista64 which is what I run.  

# May 15, 2008 5:02 PM

Chris Bilson said:

The way you felt in Missouri is exactly how I feel every time I want to try and make changes to open source code I don't have commit rights to: you make your changes very carefully, very slowly (reverts ) then hold your breath until the maintainer accepts your patches.

Git is freedom from this. Everyone can be a committer and not hurt anyone else. Contrary to what you might think intuitively (that this makes it too easy to stop integrating with others) I think this style of source management promotes shared ownership of code and does a better job tracking and enabling developers communicating via code.

# May 15, 2008 7:41 PM

Chris Ortman said:

Glad to hear.

I have not tried msysgit yet, I have been pleasantly using cygwin+git for about 9 months now.

These were the links I found helpful when I was getting started

del.icio.us/.../git

# May 15, 2008 10:26 PM

Dew Drop - May 16, 2008 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop - May 16, 2008 | Alvin Ashcraft's Morning Dew

# May 16, 2008 8:42 AM

Chris Tavares said:

You might want to give bazaar (http://bazaar-vcs.org) a try as well. It supports both fully distributed and centralized workflows, and it's a first class citizen on Windows, not an afterthought port.

# May 19, 2008 7:55 PM

Antony Stubbs said:

Best way to use Git on winbloz is just install cygwin and use git through that - works like a charm.

You will also discover that git provides far more than simply off line commit access.

# May 20, 2008 1:22 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP