Can I edit a html file directly on Github (on my browser, not desktop)?

If yes, how can I do that? Do I have to do a ‘branch’ first?
I didn’t find how to do it on Google.

Answer

Yes, you can do it on GitHub itself.

  1. In your repository, browse to the file you want to edit
  2. In the upper right corner of the file view, click to open the file editor.

enter image description here

  1. On the Edit file tab, make any changes you need to the file. I am going to add a new paragraph as “new paragraph”.

enter image description here

  1. Then commit the changes. At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file. You can create a new branch and commit the changes as follows simultaneously as follows. I add the branch name as “new-branch”.

enter image description here

  1. Next, open a pull request to merge your changes to the main branch.

enter image description here

  1. Finally you can merge the changes from your branch to the main branch.

enter image description here

  1. Now you can view the updated file.

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *