Branches and commits

A branch is a separate line of history for a draft or an experiment; a commit is a saved snapshot with a message. Comparing branches opens a pull request.

Why branches for notes#

A branch lets you rewrite your notes cleanly without breaking the working version, and then merge — or throw it away. In a team a branch is the way to propose a change and get a review before it reaches main.

In this section

  • Branches

    The branch switcher sits above the files; the list of branches and tags is on the branches page, where you also create and delete branches.

  • Commits and history

    A commit is a snapshot of files with a message, an author and a time. The branch history is on the commits page; a commit shows its files and a line-by-line diff.

  • Comparing branches

    The compare page shows the commits and files by which a branch differs from the main one, and opens a pull request right there.