Open source madness - Using Git to version your Gimp sourced custom Twitter page

What does Gimp have to do with Twitter? If you haven't already, first of all see Open source madness - Customizing my Twitter page with Gimp.

Now, isn't this overkill, you may ask, using Git to version graphic design work?

Well, not really. The whole idea of using Gimp is to have a kind of source file, which then generates your Twitter background. Then, say you want to go back to a previous version, if you are using any kind of version control system, you can go back in the time machine and generate from there. We'll use Git.

Getting started

Open up a terminal on your working directory. Perform the following commands:

$ git init
Initialized empty Git repository in .git/
$ git add .
$ git commit
Created initial commit a606982: Initial commit
 8 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 awebfactory-logo-factory-only.gif
 create mode 100644 awebfactory-logo-factory-only.jpg
 create mode 100644 back_header.gif
 create mode 100644 twitter.jpg
 create mode 100644 twitter.png
 create mode 100644 twitter.xcf
 create mode 100644 twitter20090202.png
 create mode 100644 vk200810.jpg

Everything is now under version control. Cool

Add a new file to the working directory and add it to version control:

$ git add logo.gif
$ git commit -m "logo file already used"
Created commit e6d674b: logo file already used
 1 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 logo.gif

Getting it done

Make your changes to your gimp file.

Generate your PNG file with File > Save As (just write in the png extension and Gimp will convert for you).

Now, see where you are at:

$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   twitter.png
#       modified:   twitter.xcf
#

Then, commit your changes:

$ git commit -a -m "version 2"
Created commit a086f5d: version 2
 2 files changed, 501 insertions(+), 482 deletions(-)
 rewrite twitter.png (98%)
 rewrite twitter.xcf (73%)