{"thread":{"id":"52718","subject":"How to undo git sparse-checkout set only for one directory?","startedAt":"2020-01-30T15:02:32Z","lastAt":"2020-01-30T15:08:17Z","messageCount":2,"participants":["dk@tutunak.com","Derrick Stolee"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"390803","messageId":"21812981580396191@vla3-a60e960147e7.qloud-c.yandex.net","threadId":"52718","inReplyTo":null,"subject":"How to undo git sparse-checkout set only for one directory?","fromName":"","fromEmail":"dk@tutunak.com","sentAt":"2020-01-30T14:56:31Z","receivedAt":"2020-01-30T15:02:32Z","isPatch":false,"sender":{"key":"dk@tutunak.com","avatar":null},"body":"After git sparse-checkout set <dir1> <dir2> <dir3> I want to disable sparse checkout only for one directroy - <dir2>. How can I do that? git sparse-checkout disable will do that for whole repository. \n"},{"id":"390805","messageId":"9b717655-5a89-6d88-b5c5-8bee9faf75aa@gmail.com","threadId":"52718","inReplyTo":"21812981580396191@vla3-a60e960147e7.qloud-c.yandex.net","subject":"Re: How to undo git sparse-checkout set only for one directory?","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-01-30T15:08:12Z","receivedAt":"2020-01-30T15:08:17Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/30/2020 9:56 AM, dk@tutunak.com wrote:\n> After git sparse-checkout set <dir1> <dir2> <dir3> I want to disable sparse checkout only for one directroy - <dir2>. How can I do that? git sparse-checkout disable will do that for whole repository. \n\nI'm planning to add some \"add\" and \"remove\" subcommands to the\nsparse-checkout builtin soon, and those would allow you to modify\nthe sparse-checkout cone one-by-one.\n\nFor the case you have now, you can try this:\n\n\tgit sparse-checkout list >dirs.txt\n\t(edit dirs.txt to remove the directory you do not want)\n\tgit sparse-checkout set --stdin <dirs.txt\n\nAlternatively, you could do this abomination:\n\n\tgit sparse-checkout list | grep -v \"<dir2>\" | git sparse-checkout set --stdin\n\nI hope that helps.\n\nThanks,\n-Stolee\n\n"}]}