Skip to content

Git Operations

Use these commands for everyday local Git movement.

Branches And Status

bash
gtl status
gtl branch
gtl branch --main
gtl recent
gtl dirty

gtl branch fuzzy-searches branches and checks out the selected match. gtl status gives a compact repository overview.

Commit And Push

bash
gtl commit "ship the thing"
gtl amend
gtl push
gtl sync

gtl commit stages all changes and creates a commit from a provided, positional, or default message. gtl push can auto-commit local changes before pushing the current branch.

Keep Branches Current

bash
gtl update
gtl main
gtl main --reset --backup
gtl fork-sync

gtl main rebases the current branch onto the remote default branch. Use --reset only when you intentionally want to hard-reset the current branch; --backup creates a recovery branch first.

Stash And Cleanup

bash
gtl stash save -m "wip"
gtl stash list
gtl stash apply 1 --drop
gtl clean --dry-run

gtl clean deletes merged local branches and can also inspect merged remote branches with --remote --dry-run.

Worktrees

bash
gtl worktree
gtl worktree list
gtl worktree find 123 --path
gtl worktree delete feature/my-branch --dry-run

Worktree helpers resolve branches, PR numbers, and PR URLs to local worktree paths before destructive operations.

Released under the MIT License.