Submodule in subdirectory deeper than one level is disabled for deletion

We can create a submodule in subdirectory deeper than one level, for example Application/Driver/. But I can not delete this submodule after that, Delete action for submodule is disable in menu on right button click mouse. If submodule is created in a directory on the same level as .git file all will be Ok, I mean the deletion is enable.

SourceTree version 15_05_23-SourceTree.png

2 answers

0 votes

Hi Alexander, this sounds like a bug and I've reported it at SRCTREEWIN-7571. You can watch that page for further updates, you can also add a comment if you have any question.




to overcome that trouble I created a scrypt, it works good for me. 

git config -f .gitmodules --remove-section submodule.$SUBMODPATH
git add .gitmodules
git config -f .git/config --remove-section submodule.$SUBMODPATH
git rm --cached $SUBMODPATH
rm -rf .git/modules/$SUBMOD
git commit -m $SUBMOD

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

977 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you