#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/git-more # # Commands: # # $ git checkout -b ib master # [...] # $ git commit -a # # $ git format-patch master -M -o .ib # M-x erc-bug RET # Tags: patch (pseudo header) # C-c C-a (`mml-attach-file') # C-c C-c (`message-send-and-exit') # # $ git log # $ git format-patch -2 HEAD --stdout > last-two.patch # # $ git commit --amend # # $ git reflog # $ git revert fa37950454f # # $ git branch # $ git branch -D ib # # $ git log --graph --oneline --decorate -a (alias 'glog', config file above) # $ git rebase -i HEAD~5 (git rebase --abort) # $ git pull # $ git rebase --onto origin/master 'ib^' ib # $ git format-patch master -M -o .ib # # $ git commit --amend # # $ git diff # # git --work-tree=/path/to/work/tree checkout master # GIT_WORK_TREE=/path/to/work/tree git status # # git config --unset core.bare # # git reset --hard HEAD git-cred-all () { git shortlog -s -n --all | awk '{print ++c, $0}' } git-cred () { local name=$@ git-cred-all | grep --color=never $name }