diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2019-01-04 18:44:41 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2019-01-04 18:44:41 -0500 |
| commit | d98fc2cc48bde88700f85237ce0a19d52ad09605 (patch) | |
| tree | 8ba15d62f0051eaabad954990215ae2a2d237bb3 /aliases.gitconfig | |
| parent | 147186a6cb6a4fae3dd7abd9cb282e99d6d7afd5 (diff) | |
Be explicit about licensing.
Diffstat (limited to 'aliases.gitconfig')
| -rw-r--r-- | aliases.gitconfig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/aliases.gitconfig b/aliases.gitconfig index 91d0713..50cc24f 100644 --- a/aliases.gitconfig +++ b/aliases.gitconfig @@ -59,6 +59,8 @@ # is a bit of a niche command; I create expurgated branches from # private projects more often than some people. sever = checkout --detach + # Delete all branches merged into origin/maser: `git prune-merged` + prune-merged = "!f() { git for-each-ref refs/heads/* --merged | while read hash type ref; do branch=\"$(git rev-parse --abbrev-ref \"${ref}\")\"; git branch -d \"${branch}\"; done; }; f" ## Commit authoring ## The following aliases interact with `git rebase --autosquash`; I @@ -76,6 +78,12 @@ # Retrofit changes onto an old commit during the next rebase/rewrite: # `git fixup COMMITISH` (for example, `git fixup HEAD`). fixup = commit --fixup + # Retrofit changes onto an old commit during the next rebase/rewrite, + # adding an additional comment `git squash COMMITISH` (for example, + # `git squash HEAD`). + squash = commit --squash + # Create a meaningless commit with a unique message: `git wip`. + wip = "!f() { git this && git commit -m \"wip: $(uuidgen)\"; }; f" ## Working with history # Simple text-based commit graph: `git lol [BRANCHES|--all]` |
