I am using keyword expansion like the one described in the book Pro Git. However, after a commit one needs to do, for example,
rm file
git checkout file
to have the correct keyword expansion in the working files (since smudge is applied only after checkout).
How do I make the keyword expansion happen automatically also after a commit?
Of course, I could use a hook for the remove/re-checkout, but that does not seem to be a nice solution. Moreover I would have to check manually, which file was commited.
Is there a more elegant way? Can I, for instance, let run the smudge of a filter automatically after commit?