Link to home
Start Free TrialLog in
Avatar of jdana
jdanaFlag for United States of America

asked on

git stash -u (git stash --include-untracked) - Best way to discard uncommitted changes?

I found a link (http://stackoverflow.com/questions/22620393/remove-local-git-changes) that indicates that git stash –u will discard all file changes and get me back to the last commit. I’ve tried it. It seems to work. Yet the command doesn’t seem consistent  with Git’s intent for git stash (http://git-scm.com/docs/git-stash) Is git stash –u the best way to accomplish a discard?
ASKER CERTIFIED SOLUTION
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdana

ASKER

tigermatt -

Wow. What a response. Along with git stash and git reset --hard, git clean is now in my toolkit.

Have a great weekend

J