Editing a file in the browser
Create or update files with the in-browser editor and commit in one step.
1. Start from the Code tab
On
/{owner}/{repo}, click Edit file (maintainer access required). To create a new path, navigate to/{owner}/{repo}/edit/{path}?branch={branch}— for example Create your first file on an empty repo links toedit/README.md.2. Edit content
Change the File content textarea. Markdown files (
.md,.mdx) show a live Preview pane beside the editor.3. Write a commit message
Update the Commit message field. New files default to
Create {path}; existing files default toUpdate {path}.4. Save
Click Save changes. A green confirmation appears with a View file link. If the branch head changed since you opened the editor, you may see a stale-base error — refresh and try again.
5. Cancel
Click Cancel to return to the repository Code tab without saving.
