Git Notes

1 minute read

A few years ago I also made the switch from Subversion to Git. And I never looked back. After experimenting with some other distributed version control systems, I was already convinced that it matched my way of working in a much more natural way. Moving to Git was just the cherry on the cake.

Installation

On Mac OS X recent versions ask to install git on first use.

References

Commands I keep forgetting

  • undo a commit
$ git reset --soft HEAD^

Tools

GitX

Running Mac OS X, discovering GitX was a blessing. Although normally I’m not the GUI-client-lover, this one really hits the spot.

GitX

The mother of all versions can be found at : https://github.com/pieter/gitx

But an experimental and much improved fork lives at : https://github.com/brotherbard/gitx/wiki

The version I’m currently tracking as a binary comes from http://rowanj.github.io/gitx/.

tig

Tig (http://jonas.nitro.dk/tig) is truly a console version of GitX and comes in handy when I’m working on remote hosts and GitX isn’t an option.

tig

At first sight, the keybindings don’t really come naturally, so the manual is mandatory: http://jonas.nitro.dk/tig/manual.html

On Snow Leopard I had to upgrade m4, autoconf, automake and libtool to be able to compile it:

curl -O http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
tar -xzvf m4-1.4.16.tar.gz
cd m4-1.4.16
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz
tar -xzvf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=/usr/local
make
sudo make install
cd ..
# get a fresh terminal to make sure the new version is in use
curl -O http://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz
tar xzvf libtool-2.4.tar.gz
cd libtool-2.4
./configure --prefix=/usr/local
make
sudo make install

Categories: