본문 바로가기

카테고리 없음

Git 명령어

git 로컬저장소 생성 : git init
git 원격저장소 다운로드 : git clone <url>
git 파일 추가 : git add <파일>
git 파일 삭제 : git rm <파일>
git 로컬저장소 업데이트

: git pull
e.g.) git pull origin master --allow-unrelated-histories

git 원격저장소에 반영 : git commit -m "comment"
: git push origin master
git 원격 저장소 새로 지정 : git remote rm origin
: git remote add origin <원격저장소 주소>
folk 이후 원격 저장소 변경사항 반영하기
: git remote add upstream <remote git address>
e.g.) git remote add upstream https://github.com/cozyu/CatchPrice

: git pull upstream master
: git push
: git commit -m 'merge'

git 원격저장소 정보 확인하기 : git remote -v
git 로그 저장 : git --no-pager log --stat >../git_stat_20191122.txt