diff --git a/fake_home/.shell_aliases b/fake_home/.shell_aliases index d5f12c5..faffa6e 100755 --- a/fake_home/.shell_aliases +++ b/fake_home/.shell_aliases @@ -16,6 +16,16 @@ function slides() { PATH="$OLD_PATH" } +function suckto { + local dest_branch="$1" + changed_files="$(git status --porcelain=v1 2>/dev/null | wc -l)" + git suck + git switch -c "$dest_branch" + if [[ "$changed_files" != "0" ]]; then + git stash pop + fi +} + function integrate { local from="$(realpath $1)" if [[ "$from" == "$f"* ]]; then