I wanted to use checkout to abandon the modification, but found that the newly created folder and the contents in the folder were not deleted. .
習慣沉默2017-05-02 09:50:23
Because the newly created folders and files are ‘Untracked files’, you can use git clean -fd
if you want to discard them.
过去多啦不再A梦2017-05-02 09:50:23
Two methods to obtain the git repository:
git init and git clone. The newly added files (including folders) after these two commands are not included in the git repository management. At this time, the status of git st is: Untracked files, which is required Only manual git add can be included in the git warehouse, otherwise git will be out of control.
For such files newly added to the working directory, there is a special command for reverse operation: git clean -fd. You can use man git clean to view command instructions.