Reputation: 23
There are a few folders in my Git repository that I am not actively using or changing, but others are. Since these folders use a significant amount of storage on my computer, I would like to locally delete these folders from my computer.
I've tried skip-worktree
and this lets me delete the folder without my deletion being tracked, but if there is an upstream change, it seems that the folders reappear. I do not want to be able to push or pull any changes to these folders, but allow others to still push and pull from these folders. Any suggestions on how to go about this?
Upvotes: 2
Views: 49
Reputation: 1324537
Instead of skip-worktree, you could work locally with a sparse checked out repository.
That would be possible with the recent command git sparse-checkout
(Git 2.25+, Q1 2020), which will allow you to not clone those big folders, while working on the rest.
Other contributors, when cloning the same repository, will be able to include those folders and work on their content if they need to.
Upvotes: 1