All docs

Review, stage, and commit changes

Inspect a diff, choose what goes into a commit, and check the result in the commit graph.

Review the working changes

Open the repository, check the destination branch, then select a changed file under Unstaged. Suppose search.ts has a bug fix and unrelated formatting. Use the diff to find the two changes.

A diff beside the changes list and commit composer
Choose a file in Unstaged and inspect its diff beside the commit composer. Open full-size image

Stage one change

  1. Use the diff's staging action on the bug-fix hunk or the selected lines.
  2. Open the file under Staged and confirm it contains the fix. Open the same file under Unstaged and confirm the formatting is still there.
  3. If you staged too much, use the staged diff to unstage those edits. The edits stay in your working file.
MoonGit diff and changes list after staging a single block
Review the staged and unstaged lists separately after moving a block. Open full-size image

Make a commit

  1. Enter a summary such as “Fix empty search results” and an optional description. If Git asks for an identity, set it in Settings.
  2. Select Commit. Find the new commit in the graph and check that it contains the fix.
  3. Confirm the formatting is still under Unstaged. Push when you want to share the new commit.
New commit at the top of the graph with an unstaged file still visible
After the commit appears in the graph, any changes left unstaged should still be in the working copy. Open full-size image

Watch Make Your First Commit

More docs