psdiff
psdiff uses git hooks and the lovely psd.rb library to automagically generate up-to-date image files from PSDs in the repository, allowing you to easily preview them and make use of github's image diff tools.
[ Check out an example diff ](https://github.com/filp/psdiff/commit/44b6b0466fe707396cfd6c771e5d744025e66196?diff-0=1-42)
filp@filp-x ~/dev/myproject
> $ git status
## master
A mock.psd
filp@filp-x ~/dev/myproject
> $ git commit -m "Add mock.psd"
psdiff: created mock.psd.png # <----------
[master 1156ea5] Add mock.psd
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 1.psd
create mode 100644 1.psd.png
That's it!
Update: Github now supports PSD viewing!
Check it: Github Blog - PSD Viewing & Diffing
This tool will remain available as it still possibly has its uses outside Github.
How do I install this?
Glad you asked! Couldn't be easier. Just run this in the root of a git repo:
bash <(curl -sSL https://raw.github.com/filp/psdiff/master/install.sh)
Here's what that script does:
- Scolds you if you don't have Ruby installed (it's required!)
- Checks if the
psd
gem is installed and allows you to install it if needed. - Downloads the
pre-commit
hook from this repo to your.git/hooks
.
Congrats! Any changes you make to psd files in the repository will now trigger psdiff!
Warning
It's not really a good idea to keep large PSD files in your repositories - this project is partially a proof-of-concept, and partially a helper for existing projects.
If you're a designer looking for a version control solution, check out LayerVault
Author
This tiny library was developed by Filipe Dobreira and Gabriele Cirulli