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