You can rename the folders to one of the Unity's 'Special Folder Names' and they will be ignored:  If you're on Windows, setting the folders to 'Hidden' would probably be the easiest as it likely won't be picked up as a 'change' by version control.

> During the import process, Unity completely ignores the following
> files and folders in the Assets folder (or a sub-folder within it):
>
>* Hidden folders. 
>* Files and folders which start with ‘.’. 
>* Files and folders which end with ‘~’. 
>* Files and folders named cvs. 
>* Files with the extension .tmp.

https://docs.unity3d.com/Manual/SpecialFolders.html