Deletes files from local git repository and the remote repository. Use git clean to delete unstaged/untracked files.
[delete specific file]
git rm <path-filename>
[delete multi files with wildcard]
git rm <rule>*<rule>
[example: git rm mydire/*
all files in dir]
[example: git rm src/main/java/test/*.java
all files of type java in specified dir]
[to recover a deleted file where delete has been commited first get SHA-1(Commit Id) of commit that deleted it]
git rev-list HEAD -n 1 -- <path-filename>
[Example: git rev-list HEAD -n 1 -- src/main/java/BusinessWorker.java]
[restore file]
git checkout <commid-id>^ <path-filename>
[Example: git checkout 464cb30e152b07f702e90f16f4cf6c3a5209e95b^ src/main/java/BusinessWorker.java]