[프로그래밍] Git

[GIT] git 사용법

JHVan 2024. 5. 8. 17:39

git add 로 staging area로 올리기

$git add file.js

 

현제 디렉토리 파일 전체 올리기

$git add .

 

staging 상태 확인

git status 명령어로 Stagning area 의 파일의 상태를 확인.

git commit

$git commit -m "message"

 

 

message 수정시

$git commit --amend

 

 

git 관리 상태 확인

$git status

 

add 명령 취소

$git reset <file name>

 

 

commit 된 파일 중 변경된 사항 보기

$git diff

 

git repository 에 존재하는 history 확인

$git log

 

patch log를 n 개 확인

$git log -p -n

 

어떤 파일이 수정, 변경 되었는지 확인

$git log --stat

 

각 commit 단위 한 줄씩 출력

$git log --pretty=oneline

 

commit 간의 연결된 관계를 아스키 그래프로 출력

$git log --graph

 

코드에서 추가되거나 제거된 내용 중 target 이 포함되어 있는지 검사

git log -S target

 

'[프로그래밍] Git' 카테고리의 다른 글

[GIT] 원격 저장소 관리  (0) 2024.05.08
[GIT] Branch  (0) 2024.05.08
[Git] Git?  (0) 2024.05.08