From 8284c73a43dd52bf14424609bef0fe794d8e331a Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Sat, 6 Jul 2019 19:38:19 +0200 Subject: [PATCH] Updated Examples (markdown) --- Examples.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Examples.md b/Examples.md index 17e8b54..79a5541 100644 --- a/Examples.md +++ b/Examples.md @@ -569,6 +569,23 @@ fgst() { } ``` +Interactive fixup of a commit + +``` +function git-fixup () { + git ll -n 20 | fzf | cut -f 1 | xargs git commit --no-verify --fixup +} +``` + +Usage: + +``` +git fixup +git rebase -i master --autosquash +``` + +[Article on fixup and autosquash](https://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html). + ### JRNL Suggested by [@windisch](https://github.com/windisch). Only tested under zsh.