[Git] 명령어 모음

symbbad·2023년 9월 10일
0

Git

목록 보기
2/2

git 작업 중 원하는 상황에 필요했던 명령어를 정리했습니다.

push 대기 중인 commit 확인 명령어

git log <원격 저장소 별칭>/<local branch>..<repo branch>
예시: git log origin/main..main

로컬에서 git commit 했지만 push에 제외

stash

// 가장 최근의 stash 작업 불러오기
$ git stash apply

// 원하는 작업 불러오기. stash 이름(ex. stash@{0})
$ git stash apply [stash 이름]

git push -u origin main

git push --set-upstream origin main

-u / --set-upstream 두 가지 경우 모두 로컬 저장소 브렌치를 원격 저장소 브렌치와 연결한다.

profile
꾸준히

0개의 댓글