Skip to content

Instantly share code, notes, and snippets.

@kelnishi
Created September 9, 2019 21:03
Show Gist options
  • Select an option

  • Save kelnishi/7e4973abdef2c55b768f6e61cbc7639f to your computer and use it in GitHub Desktop.

Select an option

Save kelnishi/7e4973abdef2c55b768f6e61cbc7639f to your computer and use it in GitHub Desktop.
git stash --include-untracked
git pull
git stash pop
git ls-files --full-name -u | cut -f 2 | uniq | awk '{print "\""$0"\""}' | paste -s -d" " -
FILES=$(!!); eval git reset -- $FILES; eval git checkout -- $FILES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment