2020-12-12 15:51:14 +00:00
|
|
|
#!/bin/sh
|
2021-05-06 06:29:05 +00:00
|
|
|
# Interactive rebase onto the given committish, the matching upstream branch
|
|
|
|
# or the first named ref from the history if there is no upstream yet.
|
|
|
|
if test $# -gt 0
|
|
|
|
then remote="$1"; shift
|
|
|
|
else remote=$(git rev-parse --verify --quiet @{push} || git rev-parse $(git describe --all HEAD~ | cut -d '-' -f-2))
|
|
|
|
fi
|
|
|
|
git rebase -i "$remote" "$@"
|