Skip to content

Using MK with Git

Using MK with Git

MK keeps its state in files, so Git can track it. The board is a view, and the task files are the record.

What to commit

Commit these files in your task folder:

  • The task files, such as docs/*.md.
  • .kanban.yml, which sets the board columns. See Columns.

Moving a card updates status and order. A drop after an unordered card can also assign order values to other cards in that column. The Markdown body, YAML key order, and comments are preserved. YAML whitespace can change when MK rewrites metadata.

Resolve a conflict in a task file

When two branches change the same task, a merge or rebase can leave Git conflict markers in the file. MK shows that card in the CONFLICT column and disables moves and edits until you resolve the file.

To resolve it:

  1. Open the file in your editor. Git marks the conflicting sections with start, separator, and end lines.
  2. Choose the text you want, and delete the markers.
  3. Check the frontmatter. Make sure status: holds the column you intend. A status that matches no column shows the card in OTHER.
  4. Save the file. The card moves to its column without any action on the board.
  5. Stage the file and finish the merge or rebase.

The terminal board can open the file for you. Select the card and press e. See Card actions.

For what CONFLICT, OTHER, and parse-error cards mean, see Special cards.

Revert a move

To revert a card move, or any other edit, use Git as you would for any text file. The terminal board’s u key also undoes its own moves and tag changes, but only while the files are unchanged since the action. See Card actions.