Git에서 전체 버전 트리보기 명령 줄

Git 및 gitk의 명령 줄 버전을 사용하고 있습니다. 현재 체크 아웃 된 버전에서 접근 할 수있는 부분뿐만 아니라 전체 버전 트리를보고 싶습니다. 가능할까요?



답변

다음을 시도 할 수 있습니다.

gitk --all

gitkgit rev-list이해 하는 모든 것을 사용하여 표시 할 내용을 지정할 수 있으므로 몇 가지 브랜치를 원하는 경우 다음을 수행 할 수 있습니다.

gitk master origin/master origin/experiment

… 또는 다음과 같은 더 이국적인 것 :

gitk --simplify-by-decoration --all


답변

그래픽 인터페이스를 사용할 수없는 경우 명령 줄에서 커밋 그래프를 인쇄 할 수도 있습니다.

git log --oneline --graph --decorate --all

이 명령이 유효하지 않은 옵션 –oneline으로 불평하면 다음을 사용하십시오.

git log --pretty=oneline --graph --decorate --all


답변

  1. 터미널 만있는 직장에있을 때 다음을 사용합니다.

    git log --oneline --graph --color --all --decorate

    여기에 이미지 설명 입력

  2. OS가 GUI를 지원할 때 다음을 사용합니다.

    gitk --all

    여기에 이미지 설명 입력

  3. 집에있는 Windows PC에서는 내 GitVersionTree를 사용합니다.

    여기에 이미지 설명 입력


답변

아주 좋은 대답 같은 질문은.
“~ / .gitconfig”에 다음 줄을 추가합니다.

[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"


답변

knittl의 답변에 대해 언급하기에 충분하지 않은 평판이므로 :

분기 또는 태그 이름이 필요하지 않은 경우 :
git log --oneline --graph --all --no-decorate

색상이 필요하지 않은 경우 (파이프 아웃 될 때 키 시퀀스를 피하기 위해) :
git log --oneline --graph --all --no-decorate --no-color

.gitconfig에서 별칭을 사용하여 더 쉽게 사용할 수 있습니다.

[alias]
  tree = log --oneline --graph --all --no-decorate

마지막 옵션 만 적용되므로 별칭을 재정의 할 수도 있습니다.
git tree --decorate


답변