ABOUT ME

Today
Yesterday
Total
  • [git] command line 명령어
    관리 배포/git 2021. 7. 2. 10:15

    원격 저장소 branch 최신 사항 업데이트

    $ git remote update

     

    branch 리스트 확인

    # 원격 저장소의 branch 리스트 출력
    $ git branch -r
    
    # 로컬, 원격 저장소의 모든 branch 리스트 출력
    $ git branch -a

     

    원격 저장소의 branch 가져오기

    # 원격 저장소의 branch 이름과 동일하게 로컬 저장소에 branch 생성
    $ git checkout -t origin/develop
    
    # 원격 저장소의 branch를 가져와서 특정 이름으로 로컬 저장소에 branch 생성
    $ git checkout -b [생성할 branch 이름] [원격 저장소의 branch 이름]

     

    원격 저장소에 Pull, Push 시 username, password 생략하기

    $ git config credential.helper store --global

     

    로컬 저장소를 원격 저장소 파일로 강제로 덮어쓰기

    $ git reset --hard origin/<branch_name>

    댓글

Designed by Tistory.