Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Branch Management

Commands for working with branches.

Commands

  • branch - Create, list, delete, rename branches
  • merge - Merge branches together
  • rebase - Rebase branch onto another
  • cherry-pick - Apply specific commits from another branch
  • bisect - Binary search to find a regression-introducing commit
  • stash - Save and restore uncommitted changes
  • reset - Reset branch pointer to a commit
  • revert - Undo a commit by creating an inverse commit
  • tag - Create and manage tags

Typical Workflow

# Create feature branch
mediagit branch feature-new-asset

# Switch to branch
mediagit branch feature-new-asset

# Work on feature...
mediagit add new-asset.psd
mediagit commit -m "Add new asset"

# Merge back to main
mediagit branch main
mediagit merge feature-new-asset