Giit 명령 세트
3996 단어 Git
차등 파일 출력
로그 가져오기
git log --oneline
분지내
[from commiitID]...변경 전 ID Version1
[to commiitID]...변경된 ID Version2git 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 log --oneline
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
마스터 지점 밖으로 이동하려면 다음 명령을 실행하십시오.
-- 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
git branch --contains=HEAD -- で現在のブランチを確認
git log -- で戻りたいコミットを確認
git checkout [commit] -- で、作業ディレクトリが指定したコミットの状態になる。
必要なファイルをコピーする。
git checkout [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
orgit 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 설정
Reference
이 문제에 관하여(Giit 명령 세트), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yaginagi/items/1ea390899e0b8ecd31cf텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)