From b7e2019eeed38d3b22f07c51aac8578fd53c9bee Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 13 Dec 2023 21:39:47 -0500 Subject: Move aliases to scripts. The git aliases mechanism is pretty limited; there's some stuff you can't really do without dropping to a shell. If you're going to do that, then custom subcommand scripts are more flexable than aliases that start with ! are. --- bin/git-rewrite | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/git-rewrite (limited to 'bin/git-rewrite') diff --git a/bin/git-rewrite b/bin/git-rewrite new file mode 100755 index 0000000..52bcaf9 --- /dev/null +++ b/bin/git-rewrite @@ -0,0 +1,8 @@ +#!/bin/bash -e + +# Rewrite the current branch, in place: `git rewrite` - unlike `git +# rebase`, this does _not_ advance the branch onto new upstream +# changes. You can use this to clean up branch history without +# worrying about conflicts with others' changes at the same time. + +exec git rebase --interactive --onto HEAD...@{upstream} -- cgit v1.2.3