IT 란게 삽질이 많은 분야다 보니,

잘 정리한 것만으로도 사람을 모을 수 있다고 생각하는 것 같다.

물론 기존 개발자는 가능하다. 2~3만?

그런데 요즘 애들은 링크만 주면 된다.

인터넷 서핑 공부법을 내가 창안한게 아니라

대학생 교육 7~8년 만에 깨달은 것이다.

기술 트리 일주일 교육과,
 유용한 키워드,
 링크만 주면 한달 넘도록 알아서 찾고 원문으로 공부하고,
강사보다 더 잘한다.

이젠 영어 교육이 거의 일반화 되어서 열심히, 자세히 정리하는 것보다
본인이 원강이 가능하도록 실력을 닦는게 좋다.

그런 의뢰도 많고.

notes.app 에 있는 내용을 블로그에 백업해 본다.

 

~/.ssh/conifg

Host *

   UseKeychain yes

 

   AddKeysToAgent yes

 

Host github.com

    HostName github.com

    User hajunho

    PreferredAuthentications publickey

 

    IdentityFile ~/.ssh/hjh_github

 

 

git clone git@github.com:hajunho/os_project

git config 'lfs.locksverify' false

git lfs install

git config 'lfs.locksverify' false

 

files copy

 

git lfs track "*.jpg"

"*.pdf"

"*.png"

"*.pptx"

.

.

.

 

 

git add *

git commit -m "init"

git push

 

용량이 커져서 옮기는데 github 100M limitation 있다.

 

MAC에서는 하는 방법

 git repack && git gc

 git push

brew cask install java

 java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 100M

 git reflog expire --expire=now --all && git gc --prune=now --aggressive

 git push

 

https://git-lfs.github.com/

https://rtyley.github.io/bfg-repo-cleaner/

 

참조하면 된다.

 

 암호 계속 치기 귀찮을 때는 ...

Host *

  UseKeychain yes

 

윈도우 파워쉘


https://rtyley.github.io/bfg-repo-cleaner/ 에서 jar 받고

$env:path+=";c:\Program Files (x86)\java\jdk1.8.0_131\bin"

 

 java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 100M

 

https://git-lfs.github.com/ 에서

exe 받아 설치하고

$env:path+=";C:\Program Files\Git LFS"

git-lfs track *

 

git reflog expire --expire=now --all

git gc --prune=now --aggressive

 

git push

 

.gitignore ->  commit  경우 git rm 으로 해결 가능.

 

로컬 changes 놔두고 commit  하기와 같이 지운다음.

git log master

git show c09d3f8a95a845f830204f12a3837915c1dc2081

fatal: bad object c09d3f8a95a845f830204f12a3837915c1dc2081

git reset HEAD^

git commit

git push

 

다시 커밋하고 푸시하니까 대용량 올라감...

MAC 경우 lfs 걸리기 전에 이미 세팅을 해둬서 잘되는 것이었고,

윈도우의 경우 lfs 설정 안한  까먹고 commit 먼저 만들어 버려서

문제가 생겼었음

 

로컬 파일 놔두고 commit 날려버리는 git reset HEAD^  유용함.

스택 오버플로에 나오는 SOFT옵션 쓰면 제대로 안되니 참고.

 

git reset --hard [commit number]  커밋을 지울  있다.

 

 

 

---

 

PS D:\win_torrent_1> git push

Counting objects: 43, done.

Delta compression using up to 8 threads.

Compressing objects: 100% (31/31), done.

Writing objects: 100% (43/43), 31.18 MiB | 255.00 KiB/s, done.

Total 43 (delta 22), reused 32 (delta 12)

remote: Resolving deltas: 100% (22/22), completed with 10 local objects.

remote: warning: File win_torrent_1.IAB is 58.61 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB

remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

remote: error: Trace: 380d9e0abcbc812deb3c6758aa40ee79

remote: error: See http://git.io/iEPt8g for more information.

remote: error: File win_torrent_1.PS is 193.15 MB; this exceeds GitHub's file size limit of 100.00 MB

To github.com:hajunho/win_torrent.git

 ! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'git@github.com:hajunho/win_torrent.git'

 

 

----

git lfs 적용   push에서 다음과 같은 에러가 발생한다.

ERROR: Authentication error: Authentication required: You must have push access to verify locks

git lfs uninstall  푸시하면  

lfs 경우 deploy  키로 인증이 안되는 

git lfs locks

Check that you have proper access to the repository

 

git config 'lfs.locksverify' false

 

 

요걸로 해결함 이렇게 해결해야 한다.

 

---

 

기존 repo에서  옮기는  발생 100메가 이상 로그부터 지운다.

 

https://rtyley.github.io/bfg-repo-cleaner/

 

brew update

brew cask install java

 

java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 100M

 

git repack

git gc

git push

 

안됨.

 

remote: error: File objc/Medytox/Data/pdf/brochure2017.pdf is 115.54 MB; this exceeds GitHub's file size limit of 100.00 MB

To github.com:hajunho/ios_previewty.git

 ! [remote rejected] master -> master (pre-receive hook declined)

 

error: failed to push some refs to 'git@github.com:hajunho/ios_previewty.git'

 

ㅡㅡ;.

 

** SVN 에서도 이동 **

 

ssh  등록에 config 수정,

git config --global credential.helper 'cache --timeout=99999999'

git lfs pull

CMakeCache.txt 지워주고

 

삽질 조금...

 

** git remote 변경

 

git remote set-url origin git@github.com:hajunho/ios_previewty.git

 

 

지호한방삼계탕  
3.5
Google 리뷰 6개
한식당
주소: 경기도 수원시 영통구 영통동 1009−1
연락처: 031-203-8533

죽 넣은 삼계탕으로 시키면 아플 때 시켜먹기 좋음.

한약도 넣어주는 갑다



'Blog History' 카테고리의 다른 글

390  (0) 2020.06.01
389  (0) 2020.06.01
387  (0) 2020.06.01
386  (0) 2020.06.01
385  (0) 2020.06.01

+ Recent posts