git删除单一文件或者文件夹容易操作,但对于一次删除多文件或者清空一个分支的过程代码如下:

# In the command-line, navigate to your local repository.

# Ensure you are in the default branch:
git checkout master

# The rm -r command will recursively remove your folder:
git rm -r folder-name

# Commit the change:
git commit -am "Remove duplicated directory"

# Push the change to your remote repository:
git push origin master