본문 바로가기

개발에 도움이 되는/Git

Git 명령어 모음

개인적으로 사용하는 명령어들 기록 (계속 업데이트 예정)

 

  • Git Clone 생성 : git clone [생성할 Repo URL]
  • Git 원격 저장소 정보 확인 : git remote -v
  • Git branch 생성 : git checkout -b [생성할 branch 이름]
  • Git branch 생성 후 Remote에 Push : git push -u origin [Push할 branch 이름]
  • Git branch 조회 : git branch
  • Git branch 변경 : git checkout [변경할 branch]
  • Git branch 삭제 : git branch -d [삭제할 branch]
  • Git Push 과정 
    1. git add .
    2. git commit -m "내용"
    3. git push [저장소 이름] [branch 이름]
    (Push 전에 반드시 git pull 해서 변경 사항이 있는지 확인!!)
  • Git Pull : git pull
  • Git 최근 Commit 상태로 돌아가기 (reset) : git reset --hard
  • Git remote 갱신 : git remote update
반응형

'개발에 도움이 되는 > Git' 카테고리의 다른 글

GitHub 배포 방법(요약)  (0) 2022.03.13