분석하고 디버깅하기
git log 갓 커밋마다 변경 사항 함께 보기 git log -p 최근 n개만 보기 git log -n 통계와 함께 보기 git log --stat 한 줄로 보기 git log --oneline 변경 사항 내 단어 검색 git log -S (검색어) 커밋 메시지로 검색 git log --grep (검색어) 로그 포맷...
git log 갓 커밋마다 변경 사항 함께 보기 git log -p 최근 n개만 보기 git log -n 통계와 함께 보기 git log --stat 한 줄로 보기 git log --oneline 변경 사항 내 단어 검색 git log -S (검색어) 커밋 메시지로 검색 git log --grep (검색어) 로그 포맷...
태그 종류 종류 설명 lightweight 특정 커밋을 가리키는 용도 annotated 작성자 정보와 날짜, 메시지, GPG 서명 포함 가능 태그 마지막 커밋에 태그 달기(lightweight) git ...
커밋하지 않은 변경사항 되돌리기 git restore (파일명) 변경상태를 스슽메이지에서 워킹 디렉토리로 돌려놓기 git restore --staged (파일명) 파일을 특정 커밋의 상태로 되돌리기 git restore --source=(커밋 해시) 파일명 reset 한걸 다시 되돌리기 git reflog 프로젝트가 위치한 ...
commit commit 권장사항 하나의 커밋에는 한 단위의 작업을 넣기 커밋 메시지는 어떤 작업이 이뤄졌는지 알아볼 수 있도록 작성 commit 컨벤션 type: subject body (optional) ... ... ... footer (optional) Type 타입 설명 ...
현재 모든 설정 값 보기 git config (global) --list 쥴버뀸 호환 문제 해결 git config --global core.autocrlf (윈도우: true / 맥: input) pull 기본 전략 merge 또는 rebase로 설정 git config pull.rebase false git config pull.r...
Fastforward vs 3-way merge Fastforward # 브랜치 구조 A---B---C (feature) ^ | main # merge 실행 git checkout main git merge feature # 결과 A---B---C (main, feature) 강제로 3-way-merge: -...
Git의 3가지 공간 Working Directory untracked: add된 적 없는 파일, ignore 된 파일 tracked: add된 적 있고 변경 내역이 있는 파일 git add 명령어로 Staging area로 이동 Staging area 커밋을 준비하는 단계 git commit 명령어로 reposito...
GitHub 가입 및 로그인 https://github.com/ SSH 연결 새 SSH키 생성 ssh-keygen -t rsa -b 4096 -C "your_email@example.com" SSH 에이전트 실행 및 키 등록 eval "$(ssh-agent -s)" ssh-add ~/.ssh/생성한rsa_id 공개키를 복사해서 ...
branch 생성 git branch branch_name 삭제 git branch -d branch_name 강제 삭제는 -D 조회 git branch switch 브랜치간 이동 checkout에서 변경 됨 git switch branch_name 브랜치 생성과 이동을 동시에 git swich -c br...
프로젝트의 변경사항들을 타임캡슐(버전)에 담기 변경 사항 확인 git status 파일 하나 담기 git add file_name 모든 파일 담기 git add . 타임캡슐 묻기 git commit -m "커밋 메세지" add와 commit 한번에 git commit -am "커밋 메세지" - 새로 추가된(untracked)...