Example: $ echo '*.txt ident' >> .gitattributes $ echo '$Id$' > test.txt $ git commit -a -m "test" $ rm test.txt $ git checkout -- test.txt $ cat test.txt