1. 깃 리모트 상태 확인 $ git remote -v - upstream 에 원본 저장소가 연결되지 않았다면 $ git remote add upstream 주소 2. fetch를 통해 원본 소스코드 내용을 받음 $ git fetch upstream 3. 내려받은 코드를 실제 내 repository에 merge $ git merge upstream/main 4. 내 원격 저장소로 푸시 $ git push 출처 https://jybaek.tistory.com/775 [GitHub] fork repository 최신 버전으로 유지하기 # TL;DR git remote add upstream ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git git fetch upstream git merg..
1. Git lfs와 BFG Repo Cleaner를 설치 rtyley.github.io/bfg-repo-cleaner/ BFG Repo-Cleaner by rtyley $ bfg --strip-blobs-bigger-than 100M --replace-text banned.txt repo.git an alternative to git-filter-branch The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history: Removing Crazy Big Files Re rtyley.github.io 2. 복사하고자 하는 저장소(GitLab)의 clon..
git branch -l -a -r -D -m -v -l: 로컬브랜치목록 (생략가능 git branch) -a: 로컬+원격 브랜치목록 -r: 원격브랜치목록 -D 브랜치명: 로컬브랜치 삭제 ex) git branch -D branch1 -m 브랜치명 바꿀브랜치명: 브랜치 이름바꾸기 ex) git branch -m branch1 branch2 -v: 로컬브랜치목록+마지막커밋내역 출처 : git-scm.com/book/ko/v2 Git - Book git-scm.com
git remote set-url origin
저장소1의주소에서 저장소2의주소로 migration 하기. $git clone --mirror 저장소1의주소 $cd 저장소1의주소.git $git remote set-url --push origin 저장소2의주소 $git push --mirror 출처 : wrjeoung.tistory.com/15 [Git] 저장소 히스토리까지 전체 복사 저장소1의주소 > 저장소2의주소 로 복사. $git clone --mirror 저장소1의주소 $cd 저장소1의주소.git $git remote set-url --push origin 저장소2의주소 $git push --mirror wrjeoung.tistory.com
1. 브랜치 생성 git branch " " 2. 브랜치 전환하기 git checkout " " 3. git add . 4. git commit -m "message" 5. git push origin --------Merge하는 방법은 이후에 추가할 예정---------------- --------원격 저장소에 Merge한 이후 ------------- 1. git remote update 2. git pull origin 3. 해당 브랜치 로컬에서 삭제 $ git branch -d