From e28f902e82c9ff124c07da73f44357822b5e43c1 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Sun, 15 May 2016 13:44:36 +0200 Subject: [PATCH] Add simple git aliases --- .gitconfig | 21 ++++++++++++--------- .ssh/config | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 .ssh/config diff --git a/.gitconfig b/.gitconfig index 6c33c11..b865741 100644 --- a/.gitconfig +++ b/.gitconfig @@ -54,11 +54,19 @@ [apply] # Detect whitespace errors when applying a patch whitespace = fix -[web] - browser = dillo -[browser "dillo"] - path = open [alias] + co = checkout + ci = commit + st = status + br = branch + hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short + type = cat-file -t + dump = cat-file -p + cobr = checkout -b + sts = status -s + bra = branch -a + brd = branch -d + # View abbreviated SHA, description, and history graphs lg = !"git lg1" lg1 = !"git lg1-specific --all" @@ -68,7 +76,6 @@ 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(bold yellow)%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(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)' # View the current working tree status using the short format - s = status -s # Show the diff between the latest commit and the current state d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" # `git di $number` shows the diff between the state `$number` revisions ago and the current state @@ -86,8 +93,6 @@ tags = tag -l branches = branch -a remotes = remote -v - bra = branch -a - brd = branch -d # Amend the currently staged files to the latest commit amend = commit --amend --reuse-message=HEAD # Credit an author on the latest commit @@ -107,8 +112,6 @@ dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" # List contributors with number of commits contributors = shortlog --summary --numbered - co = checkout - cobr = checkout -b root = rev-parse --show-toplevel ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags" diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..47f298a --- /dev/null +++ b/.ssh/config @@ -0,0 +1,51 @@ +Host R renly renly.jannikz router + HostName renly.jannikz + #Color cyan + +Host N balon balon.jannikz nas + HostName balon.jannikz + #Color brown + +Host A aegon aegon.tpope macbook + HostName aegon.jannikz + #Color purple + ForwardX11 yes + +Host D walder walder.tpope desktop + HostName walder.jannikz + #Color red + ForwardX11 yes + +Host L loras loras.tpope laptop + HostName loras.jannikz + #Color orange + ForwardX11 yes + +Host T tyrion tyrion.tpope htpc + HostName tyrion.jannikz + #Color magenta + ForwardX11 yes + +Host tywin + HostName tywin.jannikz + #Color magenta + +Host V varys varys.jannikz.net roxy jannikz.net tpo.pe + HostName varys.jannikz.net + #Color green + +Host home.jannikz.info + CheckHostIP no + HostKeyAlias renly.jannikz + +Host *.jannikz.us *.jannikz + ProxyCommand ssh -qax home.jannikz.info nc `echo %h|cut -d. -f1` %p + +Host *.* localhost + ProxyCommand none + +Host * + User jannikz + ForwardAgent yes + ProxyCommand sh -c '$HOME/.local/bin/jannikz host tunnel %h %p'j + -- 2.43.0