Skip to content

Instantly share code, notes, and snippets.

@ceilidhboy
Last active September 6, 2022 12:34
Show Gist options
  • Save ceilidhboy/0263f281f19cd9b053be3126aea5c3e3 to your computer and use it in GitHub Desktop.
Save ceilidhboy/0263f281f19cd9b053be3126aea5c3e3 to your computer and use it in GitHub Desktop.
Git aliases - add these to the ~/.gitconfig file
[alias]
lg = lg1
lg1 = lg1-specific --all
lg2 = lg2-specific --all
lg3 = lg3-specific --all
lg1-specific = 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(auto)%d%C(reset)'
lg2-specific = 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(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = 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(auto)%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)'
st = status
ch = checkout
br = branch
co = commit
cm = commit
ct = commit
di = diff
df = diff
dc = diff --cached
sh = show
unstage = reset HEAD --
last = log -1 HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment