-
-
Save algonzalez/f8af7a727248b2a53ed2bcc62bcc56ba to your computer and use it in GitHub Desktop.
Log Live Git Command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
clear | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM version of https://gist.github.com/tlberglund/3714970 that will run on Microsoft Windows | |
:repeat | |
cls | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all %* | |
timeout 1 >nul | |
goto repeat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# version of https://gist.github.com/tlberglund/3714970 that will run with PowerShell | |
# add `git loglive -15` to limit the number of commits to list (15 in this case) | |
do { | |
Clear-Host | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $Args | |
Start-Sleep -Seconds 1 | |
} while ($true) | |
# OR as a function | |
function git-livelog { | |
param ([int]$sleepSeconds=1) | |
if ($sleepSeconds -lt 1 -or $sleepSeconds -gt 600) {$sleepSeconds = 1} | |
do { | |
Clear-Host | |
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $Args | |
Start-Sleep -Seconds $sleepSeconds | |
} while ($true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment