How to Adopt a Branch in CLI
Documentation on adopting a branch with av CLI from Aviator with the command av branch.
Last updated
Was this helpful?
Documentation on adopting a branch with av CLI from Aviator with the command av branch.
Last updated
Was this helpful?
Aviator CLI needs to maintain the metadata for branches so that it can remember the parent-child relationships among them. If you create branches with av branch
, the metadata is created upon branch creation. You can attach the metadata for branches that are created with git branch
.
We will use an example repository from . Clone it and initialize the Aviator CLI.
Instead of using av branch
, we use a normal Git command to create a branch and a commit.
As we can see, the newly created branch mytopic
is not tracked in av tree
, but it's shown in git branch
.
By running av adopt
specifying the parent branch (in this case master
) adds metadata for the current branch mytopic
. Now, if you run av tree
, you can see that mytopic
is correctly recognized as a child of master
.