Is the branching feature available in local envirement ?
Often times there are differences in the migration files across branches, and I would have to reset the DB and restore some backup.
Can I use Neon such that whenever I checkout to a local branch, It creates/updates the current branch reflecting that of the branch name.
7 Replies
wise-white•2y ago
To your question about resetting, we have just deployed a new capability called "branch reset" that allows you to reset a branch from its parent branch. You can read about it here: https://neon.tech/docs/manage/branches#reset-a-branch-from-parent
Neon
Manage branches - Neon Docs
Data resides in a branch. Each Neon project is created with a primary branch called main. You can create child branches from main or from previously created branches. A branch can contain multiple dat...
fair-rose•2y ago
For the second part of your question I think you could use Git hooks to manage the branch creation if you wanted during local development
quickest-silverOP•2y ago
Thanks, that answers the question.
Our team has been wanting to switch to neon db for very long because of the branching feature!
deep-jade•2y ago
@ShinyPokemon isn’t the local DX something your CLI could improve or maybe just have something like your GitHub action for this as well? Seems like most who want to branch preview sites with a larger team has the samenproblen locally?
fair-rose•2y ago
@Oopsalot, yes! We're working on defining some workflows around this.
deep-jade•2y ago
@ShinyPokemon perfect, do you have an idea about when this I live? 🤞
fair-rose•2y ago
I don’t have a timeline yet but please ping me, in a month and I might have a better idea. I’ll setup a reminder too