How to delete files in github using the web interface

后端 未结 4 385
攒了一身酷
攒了一身酷 2021-02-03 20:57

The title pretty much is the question. I am aware of git rm file but this isn\'t what I am looking for. I am looking for a way to delete files and folders in a gith

4条回答
  •  一整个雨季
    2021-02-03 21:42

    There isn't a way to select multiple files for deletion using the Web UI at the moment.

    In the meantime, the way GitHub recommend editing or deleting multiple files is by working with a local repository. You would then be able to delete the files in your local clone, commit that change to your local repository, and then push that change to the remote repository on GitHub.

    The steps for doing this are:

    • 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 -m "Remove duplicated directory"
      
    • Push the change to your remote repository:

        git push origin master
      

    I hope this helps!

提交回复
热议问题