How to remove local (untracked) files from the current Git working tree
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
You must login to ask question.
Simple Way to remove untracked files
To remove all untracked files, The simple way is to add all of them first and reset the repo as below
git add --all
,git stash
andgit stash drop
, try these three commands in this order inorder to remove all untracked files. By adding all those untracked files to git and stashing them will move all those untracked files to stash list and dropping out top one i.e., stash@{0} will remove the stashed changes from stash list.