GitHub의 커맨드 라인 동작 (완전)

GitHub의 명령 행

지역의 repo

  • 설정 이름과 이메일

    git config --global user.name "xxxx"

    git config --global user.email "[email protected]"

  • 작성 및 로컬 빈 창고를 초기화

    git init <repo_name>

  • 제출의 상태를보기

    git status

  • 스크래치 패드 추가 변경

    git add <file_name>

  • 기록 정보 온라인 제출

    git commit -m "commit info"

  • 기록을 제출

    git log

  • 특정 형식의 파일 형식을 무시

    touch .gitignore && vim .gitigonre

    *.out *.py # in .gitignore

    자식으로 만든 원본 형식은 RM --cached <file_name>은 무시  공통 프로젝트 파일을 무시

  • 롤백

    git reset (--mixed --hard --soft ) HEAD~(可换) #自己查询参数

    git commit --amend 轻微修改,不进行新的提交

원격 REPO

  • 보기 지점

    git branch

  • 지점 만들기

    git branch <branch_name

  • 분기로 전환

    git checkout <branch_name>

  • 만들기 및 스위치

    git checkout -b <branch_name>

  • 지점 병합

  • 지점 동기화

  • 삭제 및 지점의 이름을 변경

  • 태그 관리

추천

출처www.cnblogs.com/hanxinle/p/11605676.html