Skip to content

git 사용법

실외 무인 경비 로봇 edited this page Jun 24, 2019 · 9 revisions

초기 설정

사용자 정보 설정

  • git config --global user.name "<사용자명>"
  • git config --global user.email "<메일 주소>"

다운로드/업로드

다운로드

전체 가져오기

  • git clone "<github 프로젝트 경로>"

변경된 사항만 가져오기

  • git pull 또는 git pull "<저장소 repository>" "<브랜치 branch>"
    • 예) git pull origin master

브랜치 선택

git checkout [-b] "<브랜치 branch>"

업로드

파일 올리기

  • git add "<파일>" 또는 git add .
  • git commit -m "<설명>"
  • git push 또는 git push "<저장소 repository>" "<브랜치 branch>"
    • 예) git push -u origin master

버전 관리

tag 붙이기

  • 방법 1) git tag v버전
  • 방법 2) git tag -a v버전 -m"설명"

tag 확인

  • git tag

참고

Clone this wiki locally