Search the field guide

Search all 29 chapters. Your search stays on this device.

↑ ↓ Move between results Enter Open · Esc Close

Browse chapters

DocsEveryday GitFIELD NOTES / 12

Everyday Git · 1 min read

Branches

Preview documentation About this guide ⓘ

GitTrail is in preview: commands and features may change before the first release, and host integrations are still being tested against each live service.

Chapter 12 of 29
On this page

In this chapterCreate, switch and manage branches for your work.

  • Branch switcher: click the branch name in the header. New branch is first, then your branches (with ↑ to push, ↓ to pull, “not published”), then remote branches you don’t have yet. Type to search. If you have uncommitted changes, GitTrail asks whether to leave them on this branch (they’re stashed, ready for when you come back) or bring them along.
  • New branch: from a branch, from a commit, or empty (no files, no history). Switch to it or not; publish right away.
  • Checkout: double-click a branch.
  • Rename, delete (with Undo), change tracking, push to a new remote branch, delete a remote branch.
  • Badges: merged, stale, ahead/behind, gone, CI status, and “worktree” when it’s checked out elsewhere.
  • Clean up branches: finds merged and stale branches (merged by history, squash, merge commit, deleted remote branch, or merged pull request) and archives them, restorable any time.
  • Compare any two branches or tags; see what changed since an earlier version of a branch (range-diff).
  • Conflict check: see whether two branches would conflict before merging.
  • Land a branch: merge into main and push, without a pull request.
  • Rebase onto any commit; move commits to another branch; restack branches built on one that changed.
  • Stacks: branches built on each other, each with its own pull request; submit or merge a whole stack.
  • Git flow: start and finish feature, bugfix, release and hotfix branches.
  • Start work on an issue: creates a branch named after the issue.
Need another approach?Find a fix →