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:
Changing the tree to the master branch: restores the ability to edit the file.