{"action":"created","issue":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/87","labels_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/87/comments","events_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/87/events","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/87","id":67329596,"number":87,"title":"Support converting repos to Git LFS","user":{"login":"rtyley","id":52038,"avatar_url":"https://avatars.githubusercontent.com/u/52038?v=3","gravatar_id":"","url":"https://api.github.com/users/rtyley","html_url":"https://github.com/rtyley","followers_url":"https://api.github.com/users/rtyley/followers","following_url":"https://api.github.com/users/rtyley/following{/other_user}","gists_url":"https://api.github.com/users/rtyley/gists{/gist_id}","starred_url":"https://api.github.com/users/rtyley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtyley/subscriptions","organizations_url":"https://api.github.com/users/rtyley/orgs","repos_url":"https://api.github.com/users/rtyley/repos","events_url":"https://api.github.com/users/rtyley/events{/privacy}","received_events_url":"https://api.github.com/users/rtyley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-09T10:23:14Z","updated_at":"2015-08-07T23:14:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/pulls/87","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/87","diff_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/87.diff","patch_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/87.patch"},"body":"[Git LFS](https://git-lfs.github.com/) allows users to commit new files to the LFS store, but breaking out _old_ files requires rewriting history, which is something the BFG is pretty good at. This rough cut allows replacing blobs with [pointer files](\r\nhttps://github.com/github/git-lfs/blob/5eb9bb01/docs/spec.md#the-pointer) throughout repo history.\r\n\r\n```\r\n$ java -jar bfg.jar --convert-to-git-lfs -fi *.png --no-blob-protection\r\n```\r\n\r\nBecause of the speed, at some point this might allow push-button conversion of big old repos to Git LFS, within in the GitHub UI.\r\n\r\nSome caveats with this initial implementation:\r\n\r\n* the BFG cleans concurrently, files may unnecessarily be hashed more than once\r\n* the working directory isn't updated\r\n* specifying `-fi *.png` should be unnecessary, should use gitattributes\r\n* need for `--no-blob-protection` is a hangover from normal BFG behaviour\r\n\r\nA compiled release can be downloaded here:\r\n\r\nhttps://github.com/rtyley/bfg-repo-cleaner/releases/download/git-lfs-alpha/bfg-1.12.4-SNAPSHOT-git-lfs-7242876.jar\r\n\r\ncc @technoweenie @rubyist @mhagger"},"comment":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/comments/128857010","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/87#issuecomment-128857010","issue_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/87","id":128857010,"user":{"login":"rtyley","id":52038,"avatar_url":"https://avatars.githubusercontent.com/u/52038?v=3","gravatar_id":"","url":"https://api.github.com/users/rtyley","html_url":"https://github.com/rtyley","followers_url":"https://api.github.com/users/rtyley/followers","following_url":"https://api.github.com/users/rtyley/following{/other_user}","gists_url":"https://api.github.com/users/rtyley/gists{/gist_id}","starred_url":"https://api.github.com/users/rtyley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtyley/subscriptions","organizations_url":"https://api.github.com/users/rtyley/orgs","repos_url":"https://api.github.com/users/rtyley/repos","events_url":"https://api.github.com/users/rtyley/events{/privacy}","received_events_url":"https://api.github.com/users/rtyley/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T23:14:54Z","updated_at":"2015-08-07T23:14:54Z","body":"> rtyley I remember checking in with you at CodeConf about your LFS access. It's been too long since I've set up a local jvm but I'd love to help test this out if you think it's close to merging.\r\n\r\nAh, thanks @nuclearsandwich - appreciate you sorting out my aged GitHub account with LFS. Will try to get back into this PR this weekend, would be awesome if you could try it out once I've got the `.gitattributes` sorted."}}