All docs

Working on code

Editing in the browser

Edit, create, rename, delete and upload files in the browser, commit directly or propose a change, and edit together live.

You don't need Git on your computer to change a repository. Fettlecode has a code editor (CodeMirror, with syntax highlighting) built in.

Edit a file

  1. Open the file on the Code tab and choose Edit.
  2. Make your changes. Tab indents; press Esc then Tab to move out of the editor.
  3. Write a commit message, then choose where it should go:
    • Commit directly to the branch, if your role and the branch rules allow it;
    • Propose it as a change for review, optionally asking named people to review it.

When the branch only changes through review, or your role can't push to it, the direct option is greyed out with the reason beside it.

Binary files, and files too large to edit in the browser, can't be opened in the editor; download and change them locally instead.

Create, rename and delete

  • New file (on a folder) or Create a file (in an empty repository) opens the editor with a file path. Type a path with slashes, such as docs/setup.md, to make folders as you go.
  • To rename or move a file, change its path while editing.
  • Delete on a file proposes or commits the deletion like any other edit.

Upload files and folders

Choose Upload files, then drag files or whole folders onto the page (or pick them). Then commit or propose them as above.

Edit an open change

A change's files can be edited in the browser too. Saving adds a new revision to the change, as if its author had pushed again. See Revisions.

Edit together, live

Open a file in the editor while someone else has it open and you're both in the same document: you see each other's cursors and names, and typing appears as it happens.

  • Whoever saves (as a commit, a change, or a new revision) credits everyone else who typed, with Co-authored-by: lines in the commit message.
  • Unsaved shared edits are kept, so a dropped connection or a closed tab loses nothing. The file's page says who's editing it now.
  • People who can read the repository but not change it can watch a change being edited, but not type.
  • To start again, you can throw away the shared edits for everyone editing the file.