반응형
Git 로그 출력 로그 파일
저는 대학 과정에서 과제를 수행하고 있으며이 과제의 버전 관리로 git을 사용하고 있습니다. 내가 작업하고있는 게임은 완료되었지만 손과 함께 git 로그를 제출하여 작업하는 동안 진행 상황을 효과적으로 보여주고 싶습니다.
나는 이것을 시도했다 :
git log --stat > log.log
그러나 그것은 거의 읽을 수없는 것들을 제공합니다. 누구든지 내가 이것에 대해 좋은 형식을 얻을 수 있도록 명령으로 나를 도울 수 있습니까?
기본값과 다른 형식을 사용하는 것이 좋습니다. 내 일반적인 선택은 그래프로 요약하는 것이지만 일반적으로 한 줄 요약만으로 트릭을 수행합니다.
옵션 1 : 그래프가있는 한 줄 요약
git log --pretty=format:'%h : %s' --graph > log.log
결과 :
* 2d3acf9 : ignore errors from SIGCHLD on trap
* 5e3ee11 : Merge branch 'master' of git://github.com/dustin/grit
|\
| * 420eac9 : Added a method for getting the current branch.
* | 30e367c : timeout code and tests
* | 5a09431 : add timeout protection to grit
* | e1193f8 : support for heads with slashes in them
|/
* d6016bc : require time for xmlschema
옵션 2 : 그래프없이 한 줄 요약
git log --pretty=format:'%h was %an, %ar, message: %s' > log.log
결과 :
a6b444f was Scott Chacon, 5 days ago, message: dammit, this is the second time this has re
49d77f7 was Scott Chacon, 8 days ago, message: modified index to create refs/heads if it i
9764edd was Hans Engel, 11 days ago, message: Add diff-lcs dependency
e1ba1e3 was Hans Engel, 11 days ago, message: Add dependency for Open4
0f87b4d was Scott Chacon, 12 days ago, message: merged recent changes
여기 문서에서 더 많은 서식 옵션을 찾을 수 있습니다.
이 라인을 시도
git log > log.txt
git log --oneline --decorate > log.txt
참고 URL : https://stackoverflow.com/questions/10063407/git-log-output-log-file
반응형
'IT Share you' 카테고리의 다른 글
java.util.Map의 이름은 어떻게 지정해야합니까? (0) | 2020.11.17 |
---|---|
gcc 명령 줄에서 문자열 리터럴을 정의하는 방법은 무엇입니까? (0) | 2020.11.17 |
최소한의 메모리 사용으로 PHP에서 배열과 같은 구조가 필요합니다. (0) | 2020.11.17 |
플라스크 값 오류보기 기능이 응답을 반환하지 않았습니다. (0) | 2020.11.17 |
Java 8 대 Java 9의 Stream.peek () 메서드 (0) | 2020.11.17 |