Loading lessons...
Edit Code on GitHub
Edit Code on GitHub
You can make simple edits right on the GitHub website, no terminal needed.
Edit a file online
- Open a file in the repository.
- Click the pencil icon (Edit this file).
- Make your changes in the editor.
- Scroll down and write a commit message.
- Choose to commit directly to the branch, or "Create a new branch and start a pull request".
Why edit on GitHub?
- Perfect for small fixes like typos in documentation.
- Useful when you are not on your own computer.
- GitHub creates the commit for you.
Commit options
You can:
- Commit the change to the current branch.
- Create a new branch and open a pull request (best for changes to someone else's repo).
The safest option
If the repository is not yours, always choose create a new branch and start a pull request. That way the owner can review your change before merging.
TL;DR
- GitHub lets you edit files directly in the browser.
- Small fixes like typos are quick to do online.
- Write a commit message and choose where to commit.
- For other people's repos, start a pull request.