내 기존 Github 저장소가 zip 및 tar.gz 파일로 비대 해져서 new Git LFS 사용 가능 저장소가 기존 Github 저장소와 분리되어 있습니다. 테스트하여 기존 Github 저장소가 건드리지 않았습니다.입니다. 나는 bfg-repo-cleaner https://github.com/rtyley/bfg-repo-cleaner이라는 멋진 도구를 발견했고 내가 필요한 것을 정확하게 본다!기존 Git Repo를 새로운 Git LFS 지원 Repo로 마이그레이션
나는 내가해야 할 필요가 있다고 생각하는 단계들을 편집했지만, 이것이 올바른 단계인지 확인하기 위해 두 번째 눈 쌍을 좋아할 것입니다. 기존의 repo는 https://github.com/username/source.git
새로운 목적지 힘내 LFS 활성화의 repo입니다 원래
는
pass=PERSONAL_ACCESS_TOKEN
ORIGINAL="https://github.com/username/source.git"
REPONAME_ORIGINAL='source.git'
NEW="https://username:"${pass}"@github.com/username/destination-lfs.git"
REPONAME_NEW='destination-lfs.git'
# setup local work space
mkdir -p /home/workgit
cd /home/workgit
# download bfg
wget -cnv http://repo1.maven.org/maven2/com/madgag/bfg/1.12.12/bfg-1.12.12.jar -O bfg.jar
alias bfg='/bin/java -jar bfg.jar'
# setup local git
git clone --mirror "$ORIGINAL" "$REPONAME_NEW"
cd $REPONAME_NEW
git count-objects -v
git remote rename origin upstream
git remote add origin $NEW
git remote -v
cd ../
time bfg --convert-to-git-lfs '*.{zip,gz,rpm,tgz,xz,bz2,rar,7z,pdf,eot,svg,ttf,woff,woff2}' --no-blob-protection $REPONAME_NEW
cd $REPONAME_NEW
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git count-objects -v
git lfs init
git push --dry-run -u origin master
git push -u origin master
내가 놓친 게 있나 https://github.com/username/destination-lfs.git
입니까? 푸시는 또한 원래의 GitHub의의의 repo는 gitlab와의 bitbucket 및 백업 위치에 추가 추가 리모컨을 가지고 너무
git push --dry-run -u origin master
Git LFS: (76 of 43 files) 799.22 MB/1.43GB
Authorization error: https://github-cloud.s3.amazonaws.com/xxxx/media/*****?actor_id=xxxxxx
Check that you have proper access to the repository
error: failed to push some refs to 'https://username:"${pass}"@github.com/username/destination-lfs.git'
실패 보인다. 나는 bitbucket과 gitlab이 github처럼 Git LFS를 지원한다고 생각한다.
건배
BitBucket은 2016 년 7 월 18 일 이후에만 LFS를 지원합니다. http://stackoverflow.com/a/38450750/6309 – VonC