Wednesday, 7 August 2013

Show whole file that is staged

Show whole file that is staged

When checking in files I have a pre-commit hook that checks for copyright
on the files uploaded. I've been getting by with grep'ing the file as it
is on file system, but it isn't optimal as someone (me) could forget to
add the latest changes and upload anyway.
What I want is basically (cat doesn't exist of course) git cat --cached
instead of git diff --cached
Is there some parameter to diff, or some other git command that can be
used for this?

No comments:

Post a Comment