How to remove local untracked files from the current Git branch

Aram Koukia
Koukia
Published in
2 min readAug 14, 2017

--

Well, the short answer as per the Git Documents is git clean

If you want to see which files will be deleted you can use the -n option before you run the actual command:

git clean -n

Then when you are comfortable (because it will delete the files for real!) use the -f option:

--

--

Software Engineer, Engineering Leader and Manager @ AWS. Living my dream life. http://koukia.ca/