Skip to content

Instantly share code, notes, and snippets.

@crwolff
Last active February 17, 2018 00:34
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 crwolff/5795380f6a8b4f2ccab598201597b695 to your computer and use it in GitHub Desktop.
Save crwolff/5795380f6a8b4f2ccab598201597b695 to your computer and use it in GitHub Desktop.
Tomato import instructions

Tomato import instructions

wget http://repo.or.cz/tomato.git/tomato-29fc6413.bundle

Import bundle into bare repository

git clone --mirror tomato-29fc6413.bundle tomato.git
cd tomato.git
git remote set-url origin http://repo.or.cz/tomato.git
git fetch --prune origin
git remote set-head origin --auto
cd ..

Make a copy for updating

cp -r tomato.git tomato_cln.git

Use BFG Repo-Cleaner to remove illegal files

java -jar ../Downloads/bfg-1.13.0.jar --strip-blobs-bigger-than 50M tomato_cln.git
cd tomato_cln.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive

Add new origin for github repository and push

git remote add new-origin git@github.com:crwolff/tomato.git
git push --all new-origin

Updating

cd tomato.git
git fetch --prune origin
cd ..
cp -r tomato.git tomato_cln.git
java -jar ../Downloads/bfg-1.13.0.jar --strip-blobs-bigger-than 50M tomato_cln.git
cd tomato_cln.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git remote add new-origin git@github.com:crwolff/tomato.git
git push --all new-origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment