N
Neon2y ago
absent-sapphire

How to reset to parent using CLI?

hello team, I have created a branch which has a parent that is NOT the main branch. When I try running:
neonctl branches reset local-development
neonctl branches reset local-development
I get this error:
Only resetting to parent is supported for now
Only resetting to parent is supported for now
Is this because my local-development branch doesn't have main set as the parent? Edit, I tried resetting a branch that has main as it's parent and also get the same message? How do I properly reset a branch to the parent using the cli?
4 Replies
absent-sapphire
absent-sapphireOP2y ago
Figured it out.... The correct command was:
neonctl branches reset local-development --parent
neonctl branches reset local-development --parent
Maybe an example call + the actual --parent flag should be added to the docs here? https://neon.tech/docs/reference/neon-cli
Neon
Neon CLI - Neon Docs
The Neon CLI is a command line interface that lets you manage Neon directly from the terminal. This documentation references all commands and options available in the Neon CLI. Install To install the ...
metropolitan-bronze
metropolitan-bronze2y ago
Hey @juanvilladev 👋🏻 Appreciate the feedback. Great to hear that you were able to solve the issue. ---- Note: If you click on branches on the URL that you shared, you'd be taken to: https://neon.tech/docs/reference/cli-branches#reset which is exactly you were looking for. ----
Neon
Neon CLI commands — branches - Neon Docs
Before you begin Before running the branches command, ensure that you have installed the Neon CLI. If you have not authenticated with the neonctl auth command, running a Neon CLI command automatically...
absent-sapphire
absent-sapphireOP2y ago
Nice! I didn't realize you could find more specific information on each command using the side menu. Thought the main page was it! Thanks!
metropolitan-bronze
metropolitan-bronze2y ago
No worries, happy to have you use Neon!

Did you find this page helpful?