GITDaniel Kasmeroglu - Jan 1, 2021 23:37
Graph view in the console
#!/bin/sh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Shows a console based graphical version of the branches and their joins.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
git log --graph --format="%Cgreen%ci%Creset %h %Cblue%ae %Cred"
List all branches
#!/bin/sh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Displays all branches of a git repository ordered by the most recently updated one.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for branch in `git branch -r | grep -v HEAD`;do echo `git show --format="%Cgreen%ci%Creset %h %Cblue%ae %Cred" $branch | head -n 1` \\t$branch; done | sort -r
List altered files
#!/bin/sh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Lists all files ever changed within the history.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# drop summary lines here drop commit lines drop graph remove first char
git log --stat=4096 --oneline | grep -v "file changed" | grep -v "files changed" | grep -v "^[0-9a-fA-F]" | sed 's/|.*//' | sed 's/^.//'