From 3fa1c08a530bb9a57497a6953c42360b85b97107 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 8 Feb 2024 08:57:59 -0500 Subject: [PATCH] Add suckto from work computer's .zsh_local --- fake_home/.shell_aliases | 10 ++++++++++ 1 file changed, 10 insertions(+) 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