Skip to content

Instantly share code, notes, and snippets.

@ryantang
ryantang / Migrating Repos with Large Files to Github
Created May 10, 2016 19:45
how to convert your repo to git-lfs and rewrite history
1. When trying to migrate a repo to Github
```
git clone --bare ssh://[email protected]:2222/project-name/repo-name.git #clone a bare repo locally
curl --header "Authorization: token <GITHUB API TOKEN>" --data '{"name": "repo-name", "description": "Migrated from project-name from gitserver.example.com" https://api.github.com/orgs/org-name/repos #create github repo
git push --mirror [email protected]:org-name/repo-name.git
```
you'll see an error like this: