Skip to main content

Module sync

Module sync 

Source
Expand description

gw sync command - Sync current branch after base PR merge

When the base PR of your current branch has been merged, this command:

  1. Updates the PR’s base branch to main via gh pr edit --base main
  2. Rebases the branch on origin/main
  3. Force pushes with –force-with-lease

§Example

$ gw status
  Branch: feature/child
  PR: #42 (open)
  Base: feature/base (merged ✓)

  Next: gw sync

$ gw sync
  Updating base: feature/base → main
  Rebasing on origin/main...
  Force pushing...
  ✓ Synced

Functions§

run
Execute the sync command