Github: How to delete files or folder?

Github: How to delete files or folder?

I don’t get it

I use the browser version

When we click on a GitHub file, a trash bin :wastebasket: icon shows up on the far right of the file header:
Help.GitHub.com/en/articles/deleting-files

To be honest I tried this but it said… can’t delete from the main… you need to make a branch…

But I didn’t want to do this

If that repo/fork is yours, you should be able to add/delete files directly at the master branch.

2 options should show up to you:

  1. Commit directly to the master branch.
  2. Create a new branch for this commit and start a pull request.


2 Likes