프로젝트 만들고 깃 ,매번 찾기 귀찮아서 정리

Seonhee Kim·2023년 7월 12일
0

FYI

목록 보기
2/12
  • 프로젝트 생성
    -> npx create-react-app 플젝이름 --template typescript

  • 레포 연결

    1. git init (git 초기화)

    2. git remote add origin <레포지토리 주소>

    3. git remote -v (연결된 repo 확인, fetch / push)

      git config --list
      git config user.name "sunny"
      git config —local user.name "sunny"
      git config —global user.name "sunny"

  • 브랜치 삭제

    1. 로컬 브랜치 삭제
      git branch -D <브랜치 이름>
    2. remote branch 삭제
      git push origin :<브랜치 이름>
  • 저장소 확인
    git remote update (remote (원격저장소) 업데이트하면서 다 가져옴)
    git branch -r (원격)
    git branch -a (로컬, 원격 모두)
    git branch -t origin/stage (가져온 원격저장소 중에 이 브랜치를 트래킹하겠다. )

  • 브랜치 생성
    1. 로컬 브랜치 생성
    git checkout -b <새로운 브랜치 이름>
    2. remote branch 생성
    git push origin <새로운 브랜치 이름>

profile
안녕하세요 ~_~

0개의 댓글