git checkout all deleted files code example

Example 1: clear untracked files git

git clean -n

Example 2: git abandon untracked files

git clean -i

Example 3: git recover deleted file

rm -rf deleted file, if there is any commit before use git commands:
// 1 Find out which comit has the copy of deleted file
git log         
// 2 Use checkout to locate which comit what file location
git checkout branch-number-here -- file/location/in/folder/without/quote
example: git checkout 476c714 -- mvc/public/js/bundle.js

Example 4: git checkout all deleted files

git checkout -f

Tags:

Misc Example