Editing files as a collaborator on GitHub

It sounds like the repository you're using has protected their main branch (usually master). This is usually because they want changes to be done with a pull request-based workflow to ensure code review and CI cleanliness before merging.

When you create a branch on the command line and push it, you should be able to modify it as normal, since it's not a protected branch. Similarly, if you create a branch through the UI, you should also be able to edit it. However, you won't be able to push directly to the main branch or edit it directly in the UI.


I got it:

I came to the source file using the search, hence the result I got was on a specific commit:

https://github.com/organisation/repo/blob/252e66a59e1b717df6b4467e4de025fcfd254a88/pages/file.ext

Changing the tree the tree to the master branch: master branch restores the ability to edit the file.