Quantcast
Channel: How do I discard unstaged changes in Git? - Stack Overflow
Viewing all articles
Browse latest Browse all 42

Answer by The Schwartz for How do I discard unstaged changes in Git?

$
0
0

Just as a reminder, newer versions of git has the restore command, which also is a suggestion when typing git status when you have changed files:

(use "git add ..." to update what will be committed)

(use "git restore ..." to discard changes in working directory)

So git 'restore' is the modern solution to this. It is always a good idea to read the suggestions from git after typing 'git status' :-)


Viewing all articles
Browse latest Browse all 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>