Giit 명령 세트

3996 단어 Git

차등 파일 출력


로그 가져오기

git log --oneline

분지내


[from commiitID]...변경 전 ID Version1
[to commiitID]...변경된 ID Version2
git archive [to_commitID] `git diff --name-only [from_commitID] [to_commitID] --diff-filter=ACMR` -o _diff.zip

例)
git archive 94958e0 `git diff --name-only 1b23c9b 94958e0 --diff-filter=ACMR` -o _diff.zip

분기간

  • git 추출 지점 간의 차분 파일로 마스터의 변경 사항을 추출합니다.
    마스터 지점 밖으로 이동하려면 다음 명령을 실행하십시오.
  • -- falseにすると、git statusで変更ファイル一覧を表示するときに、
    -- 日本語のファイル名が文字化けしないでちゃんと表示される。
    git config --bool core.quotepath false
    
    git archive --format=zip --prefix=_diff/ HEAD `git diff master --diff-filter=ACMR --name-only` -o _diff.zip
    

    지정된 로그 상태를 되돌려 원래 상태로 되돌립니다.

    git branch --contains=HEAD -- で現在のブランチを確認
    git log -- で戻りたいコミットを確認
    git checkout [commit] -- で、作業ディレクトリが指定したコミットの状態になる。
    必要なファイルをコピーする。
    git checkout [branch] -- で最初の元の状態に戻る。
    

    branch

  • 마스터에서 작업 중 분기가 발생한 기초 제출에 차이가 있는 파일을 열거했다
  • $BASE=git show-branch --merge-base master HEAD
    git archive --format=zip --prefix=_diff/ HEAD `git -c core.quotepath=false diff $BASE HEAD --name-only` -o _diff.zip
    
  • 분기 목록 가져오기bash git branch -a # - prune을 선택하면 fetch와pull에서 원격 삭제된 원격 지점을 자동으로 삭제합니다.
  • fetch --prune

    $ git fetch --prune
     x [deleted]         (none)     -> origin/hoge
    
    or

    git remote prone 실행

    $ git remote prune origin
     x [deleted]         (none)     -> origin/hoge
    

    로컬 지점과remotes/*가 일치하지 않을 때 로컬 지점을 수동으로 삭제합니다.

    # どちらも同じ
    $ git branch --delete [ブランチ名]
    $ git branch -d [ブランチ名]
    
    $ git branch -a
      develop/112
      develop/114
      develop/115
      develop/116
    * master
      remotes/origin/HEAD -> origin/master
      remotes/origin/develop/116
      remotes/origin/develop/117
      remotes/origin/master
    
    최소한의 gitconfig 설정

    좋은 웹페이지 즐겨찾기