Skip to content

Instantly share code, notes, and snippets.

@mTvare6
mTvare6 / git_submodule_resolver.zsh
Last active May 23, 2023 17:46
Have this file in dotfiles and run it, so all dependencies get resolved automatically
ROOTREPOPATH="$(pwd)/"
find . -name .git | grep -vE '^./.git' | {
while read i;
do
cd $i/..
REPOPATH=$(pwd)
REPOLINK=$(git config --get remote.origin.url)
cd $ROOTREPOPATH
REPORELPATH=$(echo "$REPOPATH" | sed "s|$ROOTREPOPATH||g")