Skip to content

Instantly share code, notes, and snippets.

@zzet
Created September 3, 2014 14:58
Show Gist options
  • Save zzet/a391762a1c4c101604c9 to your computer and use it in GitHub Desktop.
Save zzet/a391762a1c4c101604c9 to your computer and use it in GitHub Desktop.
#!/bin/bash
git filter-branch --tag-name-filter 'cat' --tree-filter '
if [ -f .gitmodules ];
then
cat .gitmodules | sed -e "s/\+[a-zA-Z]*\///g" >> .tmpgitmodules && mv .tmpgitmodules .gitmodules;
else
echo "";
fi' -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment