git open - A small git hack

You can add a git sub-command by defining a new alias in your ~/.gitconfig file as follows:

The git open defined in the ~/.gitconfig is mapped to a shell script called git-open.sh. 

This bash script does two things: 

1. It tries to detect if there are any files with uncommitted changes in the current repo and prints out the filenames.

2. If the repo doesn't have any uncommitted files, it'll print the filenames from the last commit.

The git open alias is mapped to open the output from this script using vim. 

Why is this useful?

I can pick up where I left off the previous day by simply typing `git open` inside the repo. This will open either all files with uncommitted changes or open the files from the last commit. There is a very good chance that my work for the day will continue on those files.

A small hack to make life a little bit easier.

Hands on Intro - Git

Today I presented in the Salt Lake Linux User Group meeting. The topic was "Hands on Intro - Git". It went well and I actually enjoyed it quite a bit. I choked twice once while trying to explain how to git apply patches that you receive via email, but then recovered from it with some help from the audience. But the second time I choked while trying to explain how to pull from multiple remote repositories, I couldn't recover from that. I do that so rarely it never occurred to me. Oh well, the first time is the hardest.

 
Off to prepare for the talk tomorrow at the Utah Python Group. I'm presenting "Hands on Into - PyQt4". 
 
Here are the slides from that talk. LaTeX Source: https://github.com/amjith/git_present