Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| public:computer:git [2021/08/23 16:32] – alex | public:computer:git [2022/08/26 15:05] (current) – [Git 사용법 정리] alex | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Using git ====== | ====== Using git ====== | ||
| + | |||
| + | |||
| + | ^ git 자주 사용하는 명령어 모음 | ||
| + | ^ 깃 초기화 | ||
| + | ^ 깃 상태 확인 | ||
| + | ^ 깃 저장소 복제 | ||
| + | ^ 파일 등록과 커밋 | ||
| + | ^ ::: | git commit -a -> 에디터에서 커밋 메시지 작성 | ||
| + | ^ ::: | git commit -am " | ||
| + | ^ 로그 확인 | ||
| + | ^ 커밋 비교 | ||
| + | ^ 원격 저장소 별칭 확인 | ||
| + | ^ 원격 저장소 별칭과 URL 확인 | ||
| + | ^ 원격 저장소와 연결 | ||
| + | ^ 원격 서버 삭제 | ||
| + | ^ 커밋 가져오기 | ||
| + | ^ 커밋 전송하기 | ||
| + | ^ 현재 브랜치 확인 | ||
| + | ^ 브랜치 생성 | ||
| + | ^ 브랜치 이동 | ||
| + | ^ 스태시 저장 | ||
| + | ^ 스태시 읽기 | ||
| + | ^ 브랜치 병합 | ||
| + | ^ 리베이스 병합 | ||
| + | ^ 리셋 | ||
| + | ^ 리버트 취소 커밋 | ||
| + | ^ 태그 관리 | ||
| + | ^ 태그 전송 | ||
| + | ^ 서브모듈로 연결 | ||
| + | |||
| ===== why git? ===== | ===== why git? ===== | ||
| Line 336: | Line 366: | ||
| ===== Etc ===== | ===== Etc ===== | ||
| + | * refs, reflog | ||
| + | * file annotation; blame, | ||
| + | * replace; 기존 커밋을 다른 커밋인 것처럼 변경 | ||
| + | * garbage collect; 연결고리가 없는 고립된 객체들, 주로 리셋/ | ||
| + | * prune | ||
| + | * rerere(reuse recorded resolution); | ||
| + | |||
| <cli prompt=" | <cli prompt=" | ||
| - | $ | + | $ git rev-parse 브랜치이름 |
| + | $ git show 해시값 | ||
| + | |||
| + | $ ls .git/refs -all # 저장소 refs 파일 목록 | ||
| + | |||
| + | $ git reflog | ||
| + | |||
| + | $ git blame 파일이름 | ||
| + | $ git blame -L 시작줄, | ||
| + | |||
| + | $ git replace 커밋ID1 커밋ID2 | ||
| + | |||
| + | $ git gc --auto | ||
| + | |||
| + | $ git prune --dry-run --verbose | ||
| + | $ git reflog expire --expire=now | ||
| + | $ git prune --expire now -v # 객체 삭제 실행 | ||
| + | |||
| + | $ git remote prune # 원격 저장소의 브랜치를 병합한 후 삭제, 삭제된 원격 저장소 브랜치는 더이상 참조할 수 없다 | ||
| + | $ git fetch --prune | ||
| + | |||
| + | $ git config rerere.enabled true # rerere 기능 사용, --global 옵션 가능 | ||
| + | $ git rerere status | ||
| </ | </ | ||
| Line 469: | Line 529: | ||
| references | references | ||
| </ | </ | ||
| - | pro git 한글판 http:// | + | * pro git 한글판 http:// |
| - | git 간편안내서 http:// | + | |
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||