Sublime Forum

Working with a repo in sparse-checkout shows "hidden" files


Recently our company started working on a large mono repo, where you can work on different projects within in the repo in sparse-checkout. When doing so however, Sublime Merge shows me all files that are not included into the sparse checkout cone as staged files. Even if I unstage them they immediately appear again. I have other coworkers that use other git clients that don’t have this behaviour. Is there any way I can configure Sublime Merge to don’t show the files or is this simply not possible?



SM can handle sparse-checkouts quite well. I use it every day.

The only situation it runs wild is when trying to pop a stash, which contains files of folders not included in current sparse-checkout. In that case those files are displayed as “staged” without possibility to commit or remove them from staging area.

The only solution is to hard reset the working directory to HEAD.



Thanks you very much! While resetting the working directory didn’t solve the issue for me, I now knew the issue must be on my side. Apparently the issue is with the --sparse-index flag. The docs of the repo recommend calling init with the flag which lead to showing all other files as staged. If I omit the flag everything works fine.