Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种优雅的方式来从特定的提交中签出文件,而不会导致签出挂钩触发。
例如,我不想要:
git checkout foo/bar/baz.txt
导致结帐后挂钩触发。
git show HEAD:foo/bar/baz.txt | sed -e 'some funky stuff to correct line endings' > foo/bar/baz.txt
git reset <commitid> foo/bar/baz.txt git checkout-index -f foo/bar/baz.txt