Installing Git Cola on OSX

There are tons of Git GUIs out there, ready to be installed with a couple of clicks. However, over the years I have always used Git Cola because it seems to be the only one providing one specific feature I use very often:

Stage Selected Lines

Many GUIs provide only something like this:

Stage Diff Hunk

Hunks often are not small enough for my way of committing changes. I don’t like committing whole files or huge chunk of code. I prefer small commits: easy to review, easy to `git bisect` if something goes south, easy to `git cherry-pick` if necessary. I call them micro-commits and they are so radicated in my way of working that I simply cannot working without them.

Said that, Git Cola is a bit tricky to install on Mac OSX. Here are the necessary steps for you and future-me 🙂

Install MacPorts

Download and install MacPorts for El Capitan:

Install PyQT

Once you have installed MacPorts, you need to install PyQT. Fire up a Terminal and run:

sudo port selfupdate
sudo port install py34-pyqt4

Install Git Cola

We got Python dependencies. We are almost there. A couple of commands more:

sudo pip install sphinx
brew install git-cola
git clone git:// && cd git-cola
rm -fr /Applications/ && cp -r /Applications

Done. We can now run cola from any folder containing a Git repo and the GUI will fire up.


Edit your ~/.bash_profile file and add the following line:

alias cola=’cola &’

This will start cola without locking the terminal.

Text replacement, ASCII emoji and Slack

Humans are creatures of habits and programmers… well, even more! Working remotely, I spent lots of hours interacting with people using a keyboard:

Not like that! I mean typing! Nowadays, typing emotions is a common thing: we use emojis. They are everywhere: Slack and Facebook have them. Not Twitter (Yeah, I know! I just can’t get over it!”).

You simply write 🙂 and you get a nice smiling face (Rocket science, eh, Twitter?)

Slack pushed it even more. They have a ton of icons and you can even add yours, but… BUT the keywords to trigger the icon replacement must start and end with “ : “, like :+1:, :-1:, :sweat:. It gets worse if you prefer other skin colors: :+1::skin-tone-5:.

I continuously type +1 or -_-’ and I want them to be translated in emoji, Lucky me, OSX has a text replacement feature:

System Preferences -> Language & Region -> Keyboard preferences -> Text

Keyboard preferences -> Text

Once you have your favorite ASCII emoticons ready to be replaced, you go to Slack and enable the Text Replacement:

Enable text replacement


With the same approach, you can even easily censor yourself, replacing words like f*ck, sh*t and so on 🙂

And now, go to setup some office prank for your colleagues >:)


Fellas at, we could use some emoji replacement here, too 😉