git명령어

Sarah·2020년 8월 4일
0

git init:

git stash : stash
git stash list : stash list
git stash apply : 가장 최근 스태시 불러옴

git checkout master : master로 브랜치 이동

git reset HEAD^ : commit 취소

git remote -v : remote 주소 확인

git branch --delete branchName : 브랜치삭제
git branch -D branchName : 브랜치 강제 삭제

git branch : 브랜치 리스트
git branch -v: 현재 사용하고 있는 브랜치
git checkout -b newBranchName : newBranchName이라는 브랜치 생성
git push origin newBranchName : 해당 branch를 저장소 remote branch에도 생성하고 싶을때

git pull :
git pull origin branchName: origin에 연동된 원격저장소에서 특정 branch만 pull

<git add하기 전>
git reset --hard : 모든 변경사항 수정(되돌릴 수 없으므로 주의해야 한다.)

profile
공부 목적으로 개인적으로 정리하는 공간입니다. 혹시 틀린 점이 있다면 댓글로 남겨주시면 감사하겠습니다.✍🤓 💌

0개의 댓글