0

My case is ~/Library/Application Support/TextMate/Pristine Copy/Bundles there I have some bundles/folders which are all git repos. If I create git repo at Bundles folder, which will be the easiest/fastest way to add all bundles as submodules to this repo?

tig
  • 4,803

2 Answers2

0
git init
for f in *; do
    [[ -d $f ]] && git submodule add "./$f" "$f"
done
grawity
  • 501,077
0

Got it working this way:

git init
for f in */**/.git; do
  git submodule add "$(git --git-dir="$f" config remote.origin.url)" "$(dirname "$f")"
done
tig
  • 4,803