Loading .shell/funcs +21 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,26 @@ get_shell() echo sh } update_worktree() { local upstream=$(git rev-parse --abbrev-ref --symbolic-full-name @{u}) if [ -z "$upstream" ]; then return 0 fi local stash=$(git stash create) local original=$(git rev-parse HEAD) git reset --hard HEAD git fetch origin git filter-branch -f --commit-filter ' if grep -q "Automatically generated"; then skip_commit "$@" else git commit-tree "$@" fi' $upstream..HEAD git merge --ff-only $upstream || git reset $original git stash apply $stash } update_submodules() { git submodule sync --recursive Loading Loading @@ -131,7 +151,7 @@ do_update() esac (cd ~ git pull --ff-only origin && update_worktree && update_submodules ) || return Loading Loading
.shell/funcs +21 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,26 @@ get_shell() echo sh } update_worktree() { local upstream=$(git rev-parse --abbrev-ref --symbolic-full-name @{u}) if [ -z "$upstream" ]; then return 0 fi local stash=$(git stash create) local original=$(git rev-parse HEAD) git reset --hard HEAD git fetch origin git filter-branch -f --commit-filter ' if grep -q "Automatically generated"; then skip_commit "$@" else git commit-tree "$@" fi' $upstream..HEAD git merge --ff-only $upstream || git reset $original git stash apply $stash } update_submodules() { git submodule sync --recursive Loading Loading @@ -131,7 +151,7 @@ do_update() esac (cd ~ git pull --ff-only origin && update_worktree && update_submodules ) || return Loading