When executing bit init inside a submodule, command will fail and throw an error.
On submodule, ".git" is a file and bit is expecting a folder.
Why bit is messing with the git stuff ?
bit init inside a submoduleBit should initialized
Error thrown :
ENOTDIR: not a directory, mkdir '/mnt/c/my_project_folder/.git/bit/components'
I'm trying to initialize bit on a submodule (the same way I would run yarn init on a submodule)
Yarn is used
This error happen if I install bit locally OR globally (same error in both cases)
A solution I found is to use -T flag for a standalone implementation.
bit init -T
But I think git submodules should be handled.
Thanks for reporting this. We will fix it.
Why bit is messing with the git stuff ?
It's not that Bit is messing with Git, it uses the .git directory as an ignored location to put the .bit directory. Bit does not touch or manages any of Git's resources.
Glad you found the -t option. As @GiladShoham mentioned, this should be a rather easy fix. Thanks for submitting it.
It's not that Bit is messing with Git, it uses the .git directory
I understand, but the .git directory is git folder and I don't think it's a good practice to hide ignored stuff here. I think hiding stuff there is the exact definition of "messing with git stuff" ;)
I think it would make more sense to have the .bit folder at the project root and to add it on .gitignore It's just my opinion.
Thank you for your replies.
Kevin
Most helpful comment
Thanks for reporting this. We will fix it.