Simple Install of Git on Leopard

by Thomas Aylott Thu, 21 Feb 2008 22:47:00 GMT

Here's how to install Git on Mac OS X Leopard

mkdir -p ~/Downloads/src
cd ~/Downloads/src

# Set options since we don't have GNU gettext installed
export TCL_PATH=`which tclsh`
export NO_MSGFMT=1
export GIT_VERSION='1.5.6'

# Get and install git
curl -O "http://kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.bz2"
tar xjvf "git-$GIT_VERSION.tar.bz2"
cd "git-$GIT_VERSION/"

# When on Mac OS X
./configure
make
sudo make install

cd ..

# Install Man Pages
curl -O "http://kernel.org/pub/software/scm/git/git-manpages-$GIT_VERSION.tar.bz2"
sudo tar xjv -C /usr/local/share/man        -f "git-manpages-$GIT_VERSION.tar.bz2"

Only needs some minor modifications to work on Dreamhost

mkdir -p "$HOME/src"
cd "$HOME/src"

# Set options even though we have GNU gettext installed
export TCL_PATH=`which tclsh`
export NO_MSGFMT=1
export GIT_VERSION='1.5.5'

# Get and Install Git
curl -O "http://kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.bz2"
tar xjvf "git-$GIT_VERSION.tar.bz2"
cd "git-$GIT_VERSION/"

# When on Dreamhost:
./configure --prefix="$HOME" NO_CURL=1 NO_MMAP=1
make
make install

cd ..

# Don't Bother Installing the Man Pages

After installing, you'll want to configure it

# Use Apple opendiff (FileMerge) for resolving conflicts (Mac OS X only)
git config --global merge.tool opendiff

# Ignore Carp
git config --global core.excludesfile ~/.gitignore
touch               "$HOME/.gitignore"
echo '.DS_Store' >> "$HOME/.gitignore"
echo '._*'       >> "$HOME/.gitignore"
echo '.svn'      >> "$HOME/.gitignore"
echo '.hg'       >> "$HOME/.gitignore"

# Shortcuts
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch

# Colors? YES!
git config --global color.ui auto

# Personal Setup
git config --global user.name "Your Name"
git config --global user.email your_email@your-domain.com

UPDATE: Now updated to 1.5.4.5
UPDATE: Now updated to 1.5.5 with Dreamhost support
UPDATE: Now updated to 1.5.6

7 comments

Baseline Grid Overlay Bookmarklet

by Thomas Aylott Mon, 17 Dec 2007 16:50:00 GMT

Here’s just a quickie to post something handy…

Drag this link to your bookmarks to save:

Baseline Grid 18/12

Please note: My site doesn’t conform to a baseline grid yet :[ Don’t judge me! :’(

4 comments

Select Balanced HTML Tag

by Thomas Aylott Thu, 15 Nov 2007 16:21:00 GMT

hey kids
just wanted to share with you my latest textmate innovation.

There is a bit of standard functionality that major html editors have been capable of forever

In BBEdit it’s called View > Balance

In Dreamweaver it’s called Edit > Select Parent Tag

What this does is select the current html tag, no matter where your caret is in between the opening and closing tags.

Ok, that’s all fine and lovely, but I use TextMate. And while TextMate has an Edit > Select > Enclosing Brackets function. That doesn’t actually DO anything in HTML. Nothing useful anyway.

So, what is the solution? How do we actually make this work in TextMate?

Well, that’s where I come in. TextMate is built on a community of developers who spend time extending and expanding on what TextMate is capable of.

So, I have been goofing around with ruby scripts and insanely complex regular expressions since 2005 trying to make this work.

And I have finally managed to come up with something that is simple and uses the normal standard TextMate Select > Enclosing Brackets functionality.

I call it Select Balanced HTML Tag and I have it bound to ⌘⇧B

Let’s bring up TextMate
Put the caret inside of an HTML tag that we want to select, and hit the magic shortcut key: ⌘⇧B

And she-bang! We have our tag selected.

Then you can keep hitting the keystroke to expand your selection to each succesive enclosing tag.

BUT wait, there’s more!

My “Select Balanced HTML Tag” macro is UNDOABLE!
HAHA! Take THAT HTML! Bet you didn’t see THAT one coming!

Yes, sure. Dreamweaver has the “Edit > Select Child” command, but I find that it doesnt actually DO anything most of the time.

I must admit however that the Dreamweaver and BBEdit versions of this command actually work a LOT better and WAY WAY faster, but I find that reasoning completely useless because I’m never goign to be using either of those applications.

So to sum up. New TextMate Macro Select Balanced HTML Tag Selects the current HTML Tag, similar to the BBEdit Balance and Dreamweaver Select Parent Tag commands. Except that it’s UNDOABLE and works in TextMate and is much crappier.
Written by me, Thomas Aylott.

You can download this at BundleForge.com

6 comments

Older posts: 1 2 3 4 ... 18