av-stack-sync(1) in CLI | Aviator Documentation
Uncategorized page from Aviator
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?
The technical content and code examples provided seem mostly accurate, but there are a few areas that could be improved for clarity and correctness:
-
Command Syntax: The command syntax in the
SYNOPSISsection is correct, but theCopylabel seems out of place. It might be a formatting artifact or a misplaced label. -
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.
-
Grammar: The phrase "any changes happen on GitHub" should be "any changes that happen on GitHub."
-
Option Defaults: In the
OPTIONSsection, the default values for--pushand--pruneare mentioned asask. It would be clearer to explicitly state this as "The default value isask." -
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-trunkoption is specified." -
SEE ALSO Section: The
SEE ALSOsection 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. -
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.
No product messaging analysis available for this page.
No competitive analysis available for this page.