Add example log outputs

This commit is contained in:
James Skemp 2022-09-14 23:21:58 -05:00
parent fce067a472
commit 09f10b73f3
12 changed files with 38 additions and 0 deletions

View File

@ -19,6 +19,7 @@
* [Rebasing](rebasing.md)
* [Tags](tags.md)
* [Logging](logging.md)
* [Output excamples](logging/outputs.md)
* [Files](files.md)
## Examples

BIN
src/logging/example-lg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
src/logging/example-lg2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
src/logging/example-lg3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
src/logging/example1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
src/logging/example2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

BIN
src/logging/example3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

BIN
src/logging/example4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
src/logging/example5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
src/logging/example6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
src/logging/example7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

37
src/logging/outputs.md Normal file
View File

@ -0,0 +1,37 @@
# Log output examples
`git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'`
![Example 1](./logging/example1.png)
`git log --graph --date=short --pretty=format:'%C(yellow)%h%C(reset) %C(green)%ad%C(reset) %C(red)|%C(reset) %s %C(bold blue)[%an]%C(reset)%C(yellow)%d%C(reset)'`
![Example 2](./logging/example2.png)
`git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen%cn%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative`
![Example 3](./logging/example3.png)
`git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit`
![Example 4](./logging/example4.png)
`git log --graph --pretty=format:'%C(auto)%h%Creset - %d%s %Cgreen(%cr) %C(bold magenta)<%an>%Creset'`
![Example 5](./logging/example5.png)
`git log --decorate --graph --abbrev-commit --date=relative`
![Example 6](./logging/example6.png)
`git log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'`
![Example 7](./logging/example7.png)
## Aliases
These log formats are ones that I've used quite a bit in the past, so I've set these as [Aliases](../example/aliases.md).
### lg1
`git log --graph --abbrev-commit --decorate --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`
![Example lg1](./logging/example-lg1.png)
### lg2
`git 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`
![Example lg2](./logging/example-lg2.png)
### lg3
`git 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 cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' --all`
![Example lg3](./logging/example-lg3.png)