I went looking for the Rails repository yesterday, and aimlessly browsing around, discovered that Victor maintains a fork of Buildr on github. And so I caved in. I blame it on peer pressure, cool kids, but mostly on tools that I need and just can’t find anywhere else. I finally sudo port install git +svn, fetched and switched from hg to git.
I still much prefer Mercurial. I develop, so really what I need is an rsynch that can handle branching and merging, not a lot to ask for. I’m not, and never will be, in the business of Source Control Provisioning, Management & Administration, so I appreciate anything that aims for small and simple. Git … well, there are 138 command line tools to choose from, some of which are multi-tools in their own right, so you tell me.
So why Git? A couple of reasons. First, Apache is all SVN all the time. I tried hg + svn, I kept at it for a few weeks, but eventually through some branching and merging lost the .hg repository. That was a failed experiment. Git-svn looks like a clear winner, doing almost all that I expect it to do, aside from renaming all svn tasks to something else (did I mention usability is a non-feature?)
Then there’s Github. Wonderful. In so many ways. How can you not fall in love with a social network that has syntax highlighting? And though I couldn’t care less for yet another social anything, this one is damn useful and productive. You won’t find anything like that outside of Gitland.
It’s only between first git svn fetch and dcommit that I discovered Github just had its official launch. Congratulations. It’s the thing I always wanted, just didn’t know how much.
So 24 hours after switching, here’s what my bash history reads like:
~/work/buildr $ history|awk '{print $2}'|sort|uniq -c|sort -rn|head
232 spec
50 rake
32 sudo
29 git
19 svn
19 cd
18 gem
17 ls
9 irb
8 vim
Here’s Bill de hÓra who started it, and Chris Adams who identified it as the meme du geek. Make of it what you will.

Something for your .bashrc:
source ~/bin/git-completion.sh
alias gst=’git status’
alias gl=’git pull’
alias gp=’git push’
alias gd=’git diff | mate’
alias ga=’git add’
alias gc=’git commit -v’
alias gca=’git commit -v -a’
alias gb=’git branch’
alias gba=’git branch -a’
alias gco=’git checkout’
alias gdc=’git-svn dcommit’
alias gk=’gitk –all &’
Let’s see if we cannot get ‘git’ out of your history in the next 24 hours :)
Which gives a history dump of:
$ history|awk ‘{a[$2]++} END{for(i in a){printf “%5d\t%s\n”,a[i],i}}’|sort -rn|head
73 gst
48 gca
43 cd
27 gp
26 cap
23 ga
20 gdc
20 et
18 console
17 git
Completion!
I didn’t know it exits. Turns out I need to port install git-core +svn+bash_completion first to get it working.
I don’t have to source it explicitly, my bash file takes care of it with:
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
Yeah its a great example of a completion script – sets up everything it needs itself. I have a bunch of completion stuff for rake, sake, capistrano, gem, etc. Might refactor them so you just call a single script for each, and it does all the bash completion calls etc.
Anyway,we’re now off topic :)
Assaf: you may be interested in Easy Git.
Nic: git has aliases of its own, which you can define them per-user, per-system or per-repository – see
git help config.I finally got around to installing Git just before they announced that Rails was moving there. GitHub is absolutely fantastic, but my biggest problem with Git (aside from my complete n00bism) is that the acceptance among anyone other than the hardcore rails group is virtually nil.
When I’m managing a solo project, the need for distributed management is probably overkill. When I’m working with other people, they want SVN or Mercurial. I’m completely open to Git, but it feels like an uphill climb at this point.
As for my bash history, you can tell I was doing a lot of hunting around and tweaking yesterday.
68 cd
62 ls
53 svn
44 fts
42 sc
30 sudo
28 rake
26 exit
19 ftdssh
19 cap
The one thing I did use Mercurial successfully for was working solo: keeping track of the changes I made, having a history, backed up daily, with the possibility of moving it (history and all) to central server when the team size grows to N > 1.
Pingback: Oh, go on then… at Singletoned