본문 바로가기
IT

Git 사용법

by ¢Å‰¤㏄ 2021. 11. 12.

○ git clone [url] [저장폴더명]

git repository를 자신의 로컬로 가져오는 명령어

 

○ git add [파일경로]

git 에게 해당 파일을 관리하게끔 하는 명령어

수정/추가/삭제한 파일들의 목록들의 스냅샷을 찍어 기록에 올린다

 

○ git commit

add 된 파일을 commit 한다

ex) git commit -m "[description]"

 

○ git status

git으로 관리하는 폴더의 상태를 확인

 

○ git diff

병합할때 중복되는 작업부분에 대해 차이점을 보여줌

 

○ git commit --amend

commit할 때 메세지 수정 명령어

 

○ git push [branch]

commit 된 내용을 branch에 반영

 

○ git pull [branch]

해당 branch에 최신내용을 로컬에 업데이트

 

○ git reset

add 내용을 취소

 

○ git branch [branch-name]

branch 생성

 

○ git checkout [branch-name]

branch로 이동

 

○ git checkout -b [branch-name]

branch 생성하고 바로 이동

 

○ git branch -d [branch-name]

branch 삭제

 

○ git branch

branch list 보기

 

○ git merge [branch-name]

나눠진 branch 합칠때

* 메인이 될 branch에서 진행해야 함

'IT' 카테고리의 다른 글

Intellij VS Eclipse (IDE)  (0) 2021.11.24
Spring boot란?  (0) 2021.11.18
Git 이란  (0) 2021.11.12
Apache Spark란?  (0) 2021.11.08
Cookie vs Local Storage vs Session Storage  (0) 2021.11.05

댓글