03 — Adding and editing files
Everything in this chapter happens in the browser. No tools to install.
Add File menu
Open a repository (or any folder inside it) and press Add File:
| Item | Use it for |
|---|---|
| New File | Writing a file by hand — notes, code, readme.md |
| New Directory | Creating an empty folder (chapter 04) |
| Upload File | Bringing files from your computer — images, PDFs, archives |
| Patch | Applying a ready-made diff |
Writing a new file
- Add File → New File.
- Type the file name at the top, for example
notes.md.
Typing docs/notes.md creates the docs folder at the same time.
- Write the content in the editor.
- Fill in the commit box at the bottom:
- Summary — short, in the imperative: add setup notes.
- Description — optional detail.
- Choose Commit directly to
main, or create a new branch if you want a review first (chapter 09). - Press Commit Changes.
Uploading files
- Add File → Upload File.
- Drag files in, or press the box to pick them.
- To place them in a subfolder, type the folder name in the path field at the top.
- Press Commit Changes.
Very large files (video, disk images) belong in file storage, not in a repository — the history keeps every version forever.
Editing an existing file
- Open the file.
- Press the pencil ✏️ icon at the top right.
- Change the text; the Preview changes tab shows what you altered.
- Commit as above.
Renaming and moving
Editing a file lets you change its path: put the cursor in the name field and type a new path, e.g. docs/notes.md. On commit, the file is moved — history is preserved.