Skip to content

Instantly share code, notes, and snippets.

@am5a03
Created January 29, 2016 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save am5a03/7e9a7dd7dc3435c41d80 to your computer and use it in GitHub Desktop.
Save am5a03/7e9a7dd7dc3435c41d80 to your computer and use it in GitHub Desktop.
#!/bin/bash
for dir in `ls -d *`
do
git subtree split -P $dir -b "tmp-$dir"
mkdir -p "./splitted/$dir"
cd "splitted/$dir"
git init
git pull ../../ "tmp-$dir"
cd ../../
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment