Git error: 'main/' does not have a commit checked out`
The error error: 'main/' does not have a commit checked out occurs when Git tries to add files to a submodule that is in a detached HEAD state or has no checked-out commit. This happens because the main repository expects the submodule to point to a specific commit, but it's in an invalid state.
To fix this, you need to navigate into the submodule's directory and check out a commit, usually by switching to the main branch or a specific branch.
