반응형

https://git-scm.com/book/ko/v1/Git%EC%9D%98-%EA%B8%B0%EC%B4%88-%EB%A6%AC%EB%AA%A8%ED%8A%B8-%EC%A0%80%EC%9E%A5%EC%86%8C

 

Git - 리모트 저장소

.5 Git의 기초 - 리모트 저장소 리모트 저장소 리모트 저장소를 관리할 줄 알아야 다른 사람과 함께 일할 수 있다. 리모트 저장소는 인터넷이나 네트워크 어딘가에 있는 저장소를 말한다. 저장소는 여러 개가 있을 수 있는데 어떤 저장소는 읽고 쓰기 모두 할 수 있고 어떤 저장소는 읽기 권한만 있을 수도 있다. 간단히 말해서 다른 사람들과 함께 일한다는 것은 리모트 저장소를 관리하면서 데이터를 거기에 Push하고 Pull하는 것이다. 리모트 저장소를 관리한

git-scm.com

 

Repository 복사

git clone https://github.com/account/repogitory/test.git test

 

전역 설정

1. 계정 설정

<전역 설정>

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

<대상  repository만>

git config  user.email "you@example.com" 
git config  user.name "Your Name" 

2. 라인인코딩

기본으로 lf를 사용

git config --global core.eol lf

git config --global --list|grep core.eol 

저장소에서 소스를 pull하거나 push할때 line encoding  자동 변경
git config --global core.autocrlf true

git config --global --list|grep core.autocrlf

3. LFS - Large File Storage

레포지토리에 LFS 적용

git lfs install

레포지토리에 LFS 해제

git lfs uninstall

LFS 대상 적용

git lfs track "*.zip"

LFS 관리 파일리스트

git lfs ls-files 

 

소스관리

상태확인

git status

파일추가

git add

되돌리기

git reset --soft

git reset --mixed

git reset --hard

비교

git diff

커밋

git commit

git commit -m "modify AAA"

삭제 

git rm

로그확인

git log

리모트 저장소

git remote

git remote -v

되돌리기

git checkout -- file or folder

브랜치변경

git checkout <branch>

브랜치변경 - remote

git remote update : branch 정보 업데이트

git branch -a : branch 전체 확인

git branch -r : remote branch 확인

git checkout -t origin/{branch name} : 브랜치 전환

 

PUSH

git push origin master

PULL

git pull origin master

 

 

LFS

https://newsight.tistory.com/330

 

Git LFS (Large File Storage) 사용하기

Git의 용량제한과 LFS 기본적으로 git은 여러개의 작은 소스코드 파일들을 위한 버전 컨트롤 시스템(VCS)이다. 따라서 Github의 경우 50Mb부터 Warning이 표시되고, 100Mb부터는 push시 Error가 발생한다. 그

newsight.tistory.com

 

Commit관리

https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html

 

[Git] git add 취소하기, git commit 취소하기, git push 취소하기 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io

 

반응형

+ Recent posts