Skip to content

Instantly share code, notes, and snippets.

@rdsngit
Forked from garyharan/uncommit_and_stash.sh
Created August 10, 2023 09:07
Show Gist options
  • Save rdsngit/cfcae94de1a34b23650ef3b68b9ec0fd to your computer and use it in GitHub Desktop.
Save rdsngit/cfcae94de1a34b23650ef3b68b9ec0fd to your computer and use it in GitHub Desktop.
How to stash your unpushed commits
$ git status
5 commits pending
$ git reset --soft HEAD~5 # where 5 is the number of commits you saw in the `git status`
$ git stash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment