From: Jannik ZANDER Date: Sun, 15 May 2016 13:37:28 +0000 (+0200) Subject: Add alias for uncommit, unstage, etc X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=a89b996055f4fcf2f036740359c4858abe01c9b6;p=dotfiles.git Add alias for uncommit, unstage, etc --- diff --git a/.gitconfig b/.gitconfig index b865741..5aac0f9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -56,9 +56,10 @@ whitespace = fix [alias] co = checkout - ci = commit + ci = commit -v st = status br = branch + cl = clone --recursive hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short type = cat-file -t dump = cat-file -p @@ -66,7 +67,17 @@ sts = status -s bra = branch -a brd = branch -d - + df = diff + dc = diff --cached + who = shortlog -s -- + ed = config --global -e + ls = log --oneline + ca = commit -va + caa = commit -va --amend -C HEAD + uncommit = reset --soft HEAD~1 + rmcommit = reset --hard HEAD~1 + unstage = reset HEAD -- + last = log -1 HEAD # View abbreviated SHA, description, and history graphs lg = !"git lg1" lg1 = !"git lg1-specific --all" @@ -84,9 +95,6 @@ # Pull in remote changes for the current repository and all its submodules p = !"git pull; git submodule foreach git pull origin master" # Clone a repository including all submodules - c = clone --recursive - # Commit all changes - ca = !git add -A && git commit -av # Switch to a branch, creating it if necessary go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" # Show verbose output about tags, branches or remotes @@ -94,7 +102,6 @@ branches = branch -a remotes = remote -v # Amend the currently staged files to the latest commit - amend = commit --amend --reuse-message=HEAD # Credit an author on the latest commit credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" # Interactive rebase with the given number of latest commits @@ -116,8 +123,8 @@ 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" cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope" - -[include] + k = !gitk + [include] # Local/private config goes in the include path = ~/.gitconfig_local diff --git a/.ssh/config b/.ssh/config index 47f298a..7dac317 100644 --- a/.ssh/config +++ b/.ssh/config @@ -48,4 +48,3 @@ Host * User jannikz ForwardAgent yes ProxyCommand sh -c '$HOME/.local/bin/jannikz host tunnel %h %p'j -