Created
October 10, 2016 14:13
-
-
Save seaders/ee2e69ab17191a8420995115bc5dade1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone <PRIVATE REPO> | |
cd sdk | |
git fetch --all | |
git pull --all | |
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do | |
git branch --track "${branch##*/}" "$branch" | |
done | |
git fetch --all | |
git pull --all | |
cd .. | |
cp -r sdk private-android | |
cd private-android | |
git remote rm origin | |
git clean -dfx | |
git reset --hard HEAD | |
git filter-branch -f --prune-empty --subdirectory-filter android -- --all | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
git reflog expire --expire=now --all | |
git gc --prune=now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment