bin/git-histedit

Sun, 20 Oct 2019 01:05:59 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 20 Oct 2019 01:05:59 -0500
changeset 811
abdb905668f5
parent 798
d690f45fd713
permissions
-rwxr-xr-x

vimfiler and unite out, netrw and vinegar in

#!/bin/sh
set -eu

case ${1:-} in *help|-h)
  exec perldoc -T $0;;
esac

BRANCH="$(git symbolic-ref --short -q HEAD)"
BASE=$(git merge-base "@{u}" "$BRANCH")

exec git rebase --interactive --autosquash "$@" "$BASE" "$BRANCH"

:<<=cut
=head1 NAME

git histedit

=head1 SYNOPSIS

  $ git histedit

=head1 DESCRIPTION

C<histedit> lets you edit the current branch using interactive rebase, but
without actually I<moving> the fork point of your branch, avoiding the
complications of fixing up your history and dealing with merge conflicts at the
same time.

See also: C<hg histedit>

=cut

mercurial