Why pick Git?
[ link: why-pick-git | tags: git | updated: Thu, 02 Jul 2009 15:36:58 ]
Someone on the Git LinkedIn group asked "why pick Git?". I started writing a response on LinkedIn but quickly realized I had more to say on the topic than I'd care to leave behind closed doors of LinkedIn.
If you already use Git, none of the stuff I talk about below will surprise you. But if this sparks your interest see my Git talk.
bringing git-format-patch to bzr
[ link: 20090622214023 | tags: git bzr | updated: Mon, 22 Jun 2009 22:29:29 ]
It should be of no surprise to readers of this blog that I am a fan of Git. If you know me, you will also know that I am no fan of Bzr.
I was working on something today and wanted to export a patch... you know, like git format-patch does.
Well, bzr does not seem to have an equivalent.
Scott Chacon smacks git around
[ link: 20090610202041 | tags: git | updated: Thu, 11 Jun 2009 00:11:22 ]
I came across a RailsConf talk given by Scott Chacon last month. As previously, his git work is really good. His presentation style has also guided my Git the basics talk which I gave about a year ago.
Anyway, I want to summarize what I learned from Scott's presentation...
git-vim hacking
[ link: 20090608010405 | tags: git vim vimgit | updated: Tue, 09 Jun 2009 00:29:49 ]
I did some hacking on my fork on git-vim. I am impressed how well things work. motemen, the upstream author, did a really great job setting things up.
I've been mostly tyoing with command handling and completion this evening.
I want to make that I could type :git diff ma<tab> and have it do the
rigth thing... it seems to work.
Next, I need to integrate my other git hacks and also others that seem interesting. I should also see if I can get the upstream author to consider including any of it.
splitting files out of a commit
[ link: 20090501172645 | tags: git scm | updated: Fri, 01 May 2009 17:44:38 ]
I previously wrote on splitting patches with git. This is very similar but deals with removing a file from a commit.
how old are these files in git?
[ link: git-file-blame | tags: git | updated: Wed, 01 Apr 2009 18:02:05 ]
A freind asked me how he could check the age of a file in his git repository. I came up with this:
% git ls-files | xargs -n1 -i{} git log -1 --pretty=format:"%ci {}" -- {}
2007-04-11 11:39:31 -0400 .gitignore
2008-10-18 10:52:27 -0400 Xdefaults
...
It walks through all the files tracked by git and prints the time stamp of the last commit that modified that file.
Git rocks!
splitting patches with git
[ link: 20081112150409 | tags: git scm | updated: Wed, 12 Nov 2008 15:32:01 ]
Here is a really cool workflow using git...
Say you have several commits (you can think of them as patches for this exercise) in your current repository and want to split one into multiple parts. There could be various reaons like upstream request, only want to release part of it, remove debug code, etc.
Anyway, there is one commit in your unpublished history that needs to be split.
git-svn strangeness
[ link: 20080916155113 | tags: git svn | updated: Fri, 24 Oct 2008 09:56:24 ]
As awesome as git-svn is, I had it fail today with this message:
Last fetched revision of refs/remotes/branches/foo was r19307, but we are about to fetch: r19307!
To which I said: "WTF?". I still don't know what it means, but I can share with you how I recovered it.
It turns out that git-svn is quite capable of recovering from this. You just have to remove its meta-data for the offending branch, and resync with SVN.
rm -f .git/svn/branches/foo/.rev_*
git svn fetch
I actually had multiple branches in this bad state -- but not all of them -- and I had to repeat it for all those that it complained about.
UPDATE: I upgraded to git v1.6.0.2 and the problem went away.
installilng git man pages quickly
[ link: git-man-install | tags: git | updated: Mon, 15 Sep 2008 11:42:46 ]
I just upgraded git to get a fix for a diff buffer overflow. I built the git binaries, but this box is too slow to rebuild the man pages.
Fortunately those are already prebuilt in a separate branch. One way to install them without rebuilding them locally is to:
# in a clone of git://git.kernel.org/pub/scm/git/git.git
git archive --format=tar origin/man | sudo tar -x -C /usr/share/man/ -vf -
... with which I don't have to rebuild man pages locally. Git rocks!
Git Screencast
[ link: ogre-git-screencast | tags: git talk video | updated: Fri, 01 Aug 2008 07:44:08 ]
Ian Ward posted a screencast of my Git intro talk. Thanks Richard for doing the audio, Ian for doing the screencast and post production, and Jay for hosting us.
Update: Richard took some photos of the OGRE meeting. Thanks.
