Temporarily save local changes with git stash
git stash including untracked files | git pull with local changes | save work without committing | git | stash | workflowCaution: This command changes the system. Understand what it does before you run it.
git stash push -u -m 'Hotfix test on the server'Saves modified files and, with -u, also new untracked files in a stash and resets the working directory to the last commit. Useful for quickly running a git pull or switching branches without committing unfinished work. git stash list shows all stashes, and git stash pop brings back the latest one.
Note: Ignored files (for example from .gitignore) are not saved. Restoring can cause conflicts, in which case the stash is kept.
Also searched as
- git stash including untracked files
- git pull with local changes
- save work without committing