Home / Companies / Aviator / Uncategorized / Page Details

av-stack-sync(1) in CLI | Aviator Documentation

Uncategorized page from Aviator

Page Details
Company
Word Count
481
Language
English
Contains Code
Unknown
Date Parsed
2025-12-17
Version History 1 version
2025-07-07 Current 2025-07-07 (latest)
Text

NAME av-sync - Synchronize stacked branches with GitHub SYNOPSIS Copy

av sync [--all | --current] [--push=(yes|no|ask)] [--prune=(yes|no|ask)]
        [--rebase-to-trunk] [--continue | --abort | --skip]

DESCRIPTION

av sync

is a command to fetch and push the changes to the remote GitHub repository. This command fetches from the remote, restacks the branches, and pushes the changes back to the remote. Note that currently, this overwrites the remote with force. This can overwrite any changes happen on GitHub. To avoid this, pull or manually cherry-pick the changes on the remote. When a branch is merged, the child branches are restacked to the new parent. The command prompts you if the merged branches should be deleted. REBASE CONFLICT Rebasing can cause a conflict. When a conflict happens, it prompts you to resolve the conflict, and continue with

av sync --continue

. This is similar to

git rebase --continue

, but it continues with syncing the rest of the branches. REBASING THE STACK ROOT TO TRUNK By default, the branches are conditionally rebased if needed: If a part of the stack is merged, the rest of the stack is rebased to the latest trunk commit. If a branch is a stack root (the first topic branch next to trunk), it's rebased if

--rebase-to-trunk

option is specified. If a branch is not a stack root, it's rebased to the parent branch. While you are developing in a topic branch, it's possible that the trunk branch is updated by somebody else. In some cases, you may need to rebase onto that latest trunk branch to resolve the conflicts. For example, if somebody else updates the same file you are working on, you need to rebase your branch onto the latest trunk branch. In this case, you can use

--rebase-to-trunk

option to rebase the stacks to the latest trunk branch. OPTIONS

--all

: Synchronize all branches.

--current

: Only sync changes to the current branch. (Don't recurse into descendant branches.)

--rebase-to-trunk

: Rebase the branches to trunk.

--push=(yes|no|ask)

: Push the changes to the remote. If

ask

, it prompts to you when push is needed. Default is

ask

.

--prune=(yes|no|ask)

: Delete the merged branches. If

ask

, it prompts to you when there's a merged branch to delete. Default is

ask

.

--continue

: Continue an in-progress sync.

--abort

: Abort an in-progress sync.

--skip

: Skip the current commit and continue an in-progress sync. SEE ALSO

av-restack

(1) for rebasing the branches locally.

av-adopt

(1) for adopting a new branch.

av-reparent

(1) for changing the parent of a branch. Previous av-switch Command Guide Next av-stack-tidy(1) in CLI Last updated 1 year ago Was this helpful?

Analysis

The technical content and code examples provided seem mostly accurate, but there are a few areas that could be improved for clarity and correctness:

  1. Command Syntax: The command syntax in the SYNOPSIS section is correct, but the Copy label seems out of place. It might be a formatting artifact or a misplaced label.

  2. Description Clarity: The description mentions "overwrites the remote with force," which could be more explicitly stated as "force pushes to the remote." This would make it clearer to users familiar with Git terminology.

  3. Grammar: The phrase "any changes happen on GitHub" should be "any changes that happen on GitHub."

  4. Option Defaults: In the OPTIONS section, the default values for --push and --prune are mentioned as ask. It would be clearer to explicitly state this as "The default value is ask."

  5. Rebasing Explanation: The explanation of rebasing could be more concise. For example, the section "If a branch is a stack root..." could be rephrased for clarity: "If a branch is the stack root (the first topic branch after the trunk), it is rebased if the --rebase-to-trunk option is specified."

  6. SEE ALSO Section: The SEE ALSO section is correct, but it might be helpful to provide a brief description of what each command does, similar to the descriptions provided for the options.

  7. Formatting: Ensure consistent formatting for command options and descriptions. For example, the use of backticks for command options is consistent, but ensure that all options and commands are consistently formatted throughout the document.

Overall, the content is technically sound, but these adjustments could improve clarity and readability for users.

Product Messaging

No product messaging analysis available for this page.

Competitive Analysis

No competitive analysis available for this page.