LonghandLonghand

Git Integration

Version control your writing projects with Git.

Overview

Longhand has built-in Git support for tracking changes, branching, and collaborating on writing projects.

Setting Up Git

Initialize a Repository

  1. Open a project folder
  2. Press Ctrl+Shift+G to open the Git panel
  3. Click "Initialize Repository"

Clone a Repository

  1. Press Ctrl+Shift+G
  2. Click "Clone Repository"
  3. Enter the repository URL
  4. Choose a local folder

Basic Operations

Staging Changes

  • Click the + icon next to changed files to stage them
  • Or use "Stage All Changes" to stage everything

Committing

  1. Stage your changes
  2. Enter a commit message
  3. Press Ctrl+Enter or click "Commit"

Pushing and Pulling

  • Push: Click the up arrow or press Ctrl+Shift+P
  • Pull: Click the down arrow or press Ctrl+Shift+L

Branching

Create a Branch

  1. Click the branch name in the status bar
  2. Select "Create New Branch"
  3. Enter a branch name

Switch Branches

  1. Click the branch name in the status bar
  2. Select the branch to switch to

Merge Branches

  1. Switch to the target branch
  2. Open the Git panel
  3. Click "Merge Branch"
  4. Select the source branch

Viewing History

Press Ctrl+Shift+H to view commit history:

  • See all commits with messages
  • Click a commit to view changes
  • Right-click to checkout or revert

Diff View

Longhand shows changes inline:

  • Green highlighting for additions
  • Red highlighting for deletions
  • Side-by-side diff available in split view