- # tig-like log view.
- glog = log --pretty=oneline --graph --all
- # Push to all remotes. Thanks to albel727 in #git on Freenode
- # (2011-06-04 16:06 CEST) for the idea.
- rp = ! git remote | xargs -L1 -I{} git push {}
+ # tig-like log view. Similar to the following but with author/date
+ # information. --pretty=format is not used because it doesn't allow
+ # precise enough control over formats and colors.
+ #
+ # tig = log --pretty=oneline --graph --all --decorate --abbrev-commit
+ tig = ! PWD/bin/tig.pl
+
+ # Create backup of uncommitted and untracked changes.
+ ssb = "! git stash save --include-untracked \
+ \"Backup on $(LANG=C date '+%a, %d %b %Y %H:%M:%S %z')\" \
+ >/dev/null \
+ && git stash apply >/dev/null"
+
+ # Display list and content of untracked files. Untracked directories
+ # and symbolic links are only listed.
+ u = "! git ls-files --other --exclude-standard --directory -z \
+ | xargs -0 sh -c '\
+ for x; do \
+ printf \"\\033[1;33m-> %s\\033[0m:\" \"$x\"; \
+ if test -d \"$x\"; then \
+ echo \" directory\"; \
+ elif test -h \"$x\"; then \
+ echo \" symbolic link\"; \
+ else \
+ echo; \
+ cat \"$x\"; \
+ fi; \
+ echo; \
+ done' argv0 \
+ | less"