git - Github: avoid syncing/pulling README.md -
how can exclude readme.md sync/pull/push github requests? wish download/sync files except file.
context: have repo streakycobra style dotfiles management. add notes readme.md (showing on github), wish avoid having file in $home on computer.
working off of @kba's comment, here's solution works:
you can enable sparse checkout repo following command: git config core.sparsecheckout true
then edit repository's .git/info/sparse-checkout file be:
/* !readme.md which says "checkout everything, except file named readme.md". format of sparse-checkout works same .gitignore file.
just tested checking out existing repository, , works. (although, there's catch-22 situation need existing repository configure sparse checkout on, used git init create one, configured it, , added existing repo new remote).
Comments
Post a Comment