Skip to content

Git

View → Toggle Git, or type git in the command palette (⇧⌘P / Ctrl+Shift+P).

The Git panel works when the vault folder is a git repository. If it is not, the panel says “This vault is not a git repository.” To make it one, run this once in a terminal, inside the vault folder:

Terminal window
git init
  • The branch you are on, after Branch:.
  • How many files have changed since the last commit, and which ones. The letter in front says how: A for a new file, M for a changed one (a renamed file counts as changed), D for a deleted one, U for a conflict.
  • “No changes since the last commit.” when there is nothing new.

The list updates by itself after each save. The ↻ button reads it again at any time.

Write a message in the Commit message box and click Commit. Every file in the list goes into the commit, and the panel shows its id — “Committed dffc1e5.” — and then “No changes since the last commit.”

mdai does not push or pull. Use your usual git tool for that.