forked from mosaicstack/stack
git pull --rebase fails with 'cannot pull with rebase: You have unstaged changes' when the skills repo has local modifications. Fix: detect dirty index/worktree, stash before pull, restore after. Also gracefully handle pull failures (warn and continue with existing checkout) and stash pop conflicts.