Skip to content

Edit a file on GitHub

How to make small edits directly on GitHub.

Generally, when working on a coding or documentation project, you will have a local version of the files, and manage them using the git command line or GUI tool. However, sometimes you just want to make a small change (fix a typo, say). You can do this directly in GitHub. This is especially useful if it is not your project: for example, you were browsing documentation, noticed a small error, and want to quickly contribute a fix without cloning and running locally.

  1. Check if the project has contribution guidelines. These may be in a contributing.md file, or in the README. Make sure you follow any project guidelines and code of conduct.
  2. In GitHub, navigate to the file you want to change.
  3. Select the Edit this file button: Icon
  4. Make your changes.
  5. Enter a commit summary and description. If your change relates to an issue, include the issue number, and put a link in the description.
  6. Select Create a new branch for this commit and start a pull request.
  7. Enter a branch name. This should be short and descriptive. Consider including an issue number.
  8. Select Propose file change. GitHub takes you to the form to open a pull request.
  9. You can enter more information if needed. You can also assign a reviewer or add labels, if you are familiar with the project.
  10. Select Create pull request.