(transfer) Git operation

Many files have been modified locally, some of which are new, because these are not needed for development. If you want to discard them, you can use the following commands:

git checkout . # All local modifications. If there are no commits, return to the original state
git stash # Temporarily store all uncommitted changes in stash. Reply with git stash pop.
git reset --hard HASH #Return to a node without retaining changes.
git reset --soft HASH #Return to a node. Changes reserved

git clean -df #Return to a node
git clean parameter
-n display files and directories to be deleted
-f delete files
-df delete files and directories

It is also possible to use:

git checkout . && git clean -xdf

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324611801&siteId=291194637