Skip to content

Instantly share code, notes, and snippets.

@woody
woody / gitalias
Last active October 31, 2021 03:59
Git alias
[alias]
ls = log --oneline
st = status
cm = commit -m
ck = checkout
cb = checkout -b
logg = log --pretty=format:'%h %s' --graph
main = checkout main
amend = commit --amend --no-edit
replay = rebase -i
@woody
woody / task.sh
Last active May 3, 2016 08:39
The simplest task management on shell
#!/usr/bin/env bash
task() {
[ -f /tmp/todo ] || cat /tmp/todo
if [ $# -gt 0 ]; then
echo "$1">>/tmp/todo
else cat /tmp/todo
fi
}
@woody
woody / clean.sh
Created November 1, 2015 12:54
Reclaim disk space if you have lots of git repos via https://twitter.com/passy/status/650440497564004352
find . -name '.git' -type d -exec git --git-dir='{}' --work-tree='{}/..' gc \;