git pull --autostash

Category: Git - Core

git pull --autostash

Pull with local changes stashed first

Stashes uncommitted working-tree changes before pulling and restores them afterwards. Without it a dirty tree can block the pull. Conflicts between the stash and the new commits need manual resolution.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.