Reputation: 11910
I am looking for an elegant way to checkout a file from a particular committish, without causing the checkout hooks to fire.
Eg, I do not want:
git checkout foo/bar/baz.txt
to result in the post-checkout hook firing.
Upvotes: 2
Views: 68
Reputation: 791849
git reset <commitid> foo/bar/baz.txt
git checkout-index -f foo/bar/baz.txt
Upvotes: 1
Reputation: 129566
git show HEAD:foo/bar/baz.txt | sed -e 'some funky stuff to correct line endings' > foo/bar/baz.txt
Upvotes: 2