Last active
November 2, 2015 21:30
-
-
Save jhoblitt/8356077e7e3456596a5c to your computer and use it in GitHub Desktop.
Revisions
-
Joshua Hoblitt revised this gist
Sep 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # converting an existing repo to use "lfs" # # note that a .gitattributes file for lfs needs to be added to any commit in # which large files are present in the tree -
Joshua Hoblitt created this gist
Sep 1, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # converting an existing repo to use "fs" # # note that a .gitattributes file for lfs needs to be added to any commit in # which large files are present in the tree wget https://github.com/rtyley/bfg-repo-cleaner/releases/download/git-lfs-alpha/bfg-1.12.4-SNAPSHOT-git-lfs-7242876.jar git clone [email protected]:/home/price/LSST/ci_hsc cd ci_hsc java -jar ../bfg-1.12.4-SNAPSHOT-git-lfs-7242876.jar --convert-to-git-lfs -fi *.fits --no-blob-protection --private git reset --hard # stolen from https://gist.github.com/larsxschneider/a31fb77c7e9a9c9b81da for FILE in .git/lfs/objects/*; do OBJ_ID=$(basename "$FILE") OBJ_DIR=".git/lfs/objects/${OBJ_ID:0:2}/${OBJ_ID:2:2}" mkdir -p "$OBJ_DIR" mv "$FILE" "$OBJ_DIR/$OBJ_ID" done git filter-branch --tree-filter "echo '*.fits filter=lfs diff=lfs merge=lfs -text' > .gitattributes" HEAD git reflog expire --expire=now --all && git gc --prune=now git remote rename origin upstream git remote add origin [email protected]:lsst/ci_hsc.git git push -u origin master