I'm trying to check if the current repo is not a submodule but the top level
git repository. I have tried the following command: git submodule init
Output:
You need to run this command from the toplevel of the working tree.
But it will init the submodule. How can I check the current repository if it isn't a submodule but the top level git repository, without making a change in the repository?