diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-11-02 00:00:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-11-02 00:00:56 +0900 |
| commit | c30efdd568efe2ba9f357a115a8c55386b6f55c3 (patch) | |
| tree | 687fbdf9549595d1316dced4491dded22bc65b72 | |
| parent | 1b46dcfd97fbbd8662466a347d778de7b684f021 (diff) | |
| download | dotfiles-c30efdd568efe2ba9f357a115a8c55386b6f55c3.tar.gz dotfiles-c30efdd568efe2ba9f357a115a8c55386b6f55c3.tar.zst dotfiles-c30efdd568efe2ba9f357a115a8c55386b6f55c3.zip | |
| -rw-r--r-- | .config/git/config | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/git/config b/.config/git/config index d03ee29..555701c 100644 --- a/.config/git/config +++ b/.config/git/config @@ -219,3 +219,12 @@ git branch \"$backup_branch\" \"$branch\"; \ fi; \ }; __fn" + squash-onto = "!__fn() { \ + if [ \"$1\" = \"\" ]; then \ + echo \"usage: git squash-onto <base-ref>\" >&2; \ + exit 1; \ + fi; \ + local base_ref=\"$1\"; \ + git reset --soft \"$base_ref\" && \ + git commit --edit -m \"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; \ + }; __fn" |
