You can apply a patch file (without committing the changes yet) by simply running
git apply patchfile
Then you can simply create a new stash from the current working directory:
git stash
More Related Contents:
- How to clone all remote branches in Git
- How do I remove a submodule?
- Delete commits from a branch in Git
- Difference between “git add -A” and “git add .”
- How to find and restore a deleted file in a Git repository
- Default behavior of “git push” without a branch specified
- Git alias with positional parameters
- git update-index –assume-unchanged on directory
- Accidentally reverted to master, lost uncommitted changes [closed]
- How does git detect similar files, for its rename detection?
- Remove a folder from git tracking
- What are the differences between git remote prune, git prune, git fetch –prune, etc
- Does deleting a branch in git remove it from the history?
- Git non-fast-forward rejected
- What is the difference between “git branch” and “git checkout -b”?
- Why is “origin/HEAD” shown when running “git branch -r”?
- Git: Set up a fetch-only remote?
- Git: discover which commits ever touched a range of lines
- Fatal: Could not read password for ‘https://[email protected]’: terminal prompts disabled
- How to change my Git username in terminal?
- Remove commit for good
- Move file and directory into a sub-directory along with commit history
- Git: How to create patches for a merge?
- List Git commits not pushed to the origin yet [duplicate]
- git – pulling from specific branch
- How to apply `git diff` patch without Git installed?
- Can a project have multiple origins?
- Error “Your push would publish a private email address”
- GnuTLS recv error (-110): The TLS connection was non-properly terminated
- How to manage multiple ssh keys in the ~/.ssh directory