Bidirectional git sync for v0 Premium users is now in beta

Happy to announce we’re rolling out bi-directional git sync for v0 Premium users

You can connect your chat to GitHub to either main or another branch and every new generation will be synced as a new commit

If you create a new branch it will fork your chat and then all generations in the new fork will write to that branch.

This feature unlocks a development workflow where you work in a new chat with a fresh branch and deploy by reviewing and merging the PR through GitHub. If you find another workflow that works well for you, feel free to share in the comments

This is still in beta so there may be rough edges, but the more bug reports we get the faster we can fix them

5 Likes

how do I turn this v0 auto-sync OFF? I’d like not to clutter git with every change I do in the chat especially when I am still exploring concepts. Here is how I’d like to work:

  1. Make a change to my code in chat
  2. Manually deploy to vercel via the deploy button (this works quite well)
  3. Continue iterations of 1,2
  4. Then when satisfied w my changes, explicit manually commit all changes to git (with a pre-populated commit comment) from the v0 UI

Optional:
5) Retain current feature where vercel listen to git commits and then decide if need to do a new deploy

how can i turn this off its pullign from github my old code and not pushing the new one

Good catch, a disconnect feature is shipping ASAP, I’ll post here again when it’s deployed

Can you describe a little more about what happened?

  • you enabled the git sync in an existing chat with an existing repository
  • it immediately pulled the main branch into your chat and overwrote your code?

if that’s the case you should be able to hit Restore on an earlier chat version which should then push it as the latest chat in a new commit

But we should be able to smooth this process out during this beta period

Have you tried switching to a new branch and doing your v0 dev from there? Then you can deploy previews at any time, and your “explicit manual commit” is just a PR into the main branch

1 Like

so i have been pushing to Github from before but since the sync was added ill work on a code and if im inactive it says its found a update in git and just pulls it in the chat it happens before you deploy and sometimes randomly

Thanks Jacob - yeah I read from your announcement this is your suggested workflow. However when I branch this also creates a new chat and that new chat does not have the context of my original chat - only the code. So I cannot refer to previous information (in my case I gave v0 a tasks.md file to work thru) - so lot of info and past context lost.

I think branching is useful but I definitely also think my workflow is a very typical use-case: I want to control when the system sync with git and the typical use-case is only after a few iterations of vo coding, deploying and testing then we have a new workable milestone to push. Likew=ise I should also be able to sync from git v0.. obviously you will have to think thru how you would handle conflicts…

1 Like

i agree with this it shoudl only pull when we ask it to lets say we manually code something in or added something from else where we can pull it in and it push to the hub when we push it but the sync is not a very good use case

Options to disable committing have been added, thanks for the feedback!

This is great @jacobparis ! Glad to see you shipping the feedback so quickly too.

I have a question: What is the optimal workflow for creating a preview deployment?

I’d like to have my main production domain linked with the main branch, but for maybe “test” branches, I’d like to deploy it to my vercel account under another “staging” domain for internal testing first.

How would I do this with the new v0 git workflow + Vercel?

1 Like

We recently shipped this feature to let you choose whether a deployment goes to production or to a preview environment

And now with the git sync, it’ll only let you deploy to preview if you’re synced to a branch instead of to main, so devs on your team can’t accidentally override production

2 Likes

I am on a team plan but I dont believe we have access, would love to use this ASAP is there any way you can help? I believe a team plan is higher than a premium plan, or is this only for a premium plan?

Hey Jacob, do team plans get access to this feature? As Im not seeing the ability to do any bi-drectional sync and I can only connect to github, and nothing else. thanks!

You might wanna check this thread i posted yesterday on the bug that drive me crazy V0 Github Branch Selection Bug - Sticky Testing Branch Issue

How is this bidirectional? I should be able to pull a github branch into an ongoing v0 project. that would be bidirectional.

Officiailly shipped :slight_smile:

2 Likes

@pawlean - is this to a personal repository only? Or can we do an org? I don’t see my org when I auth github to v0.

Is there documentation to sync my organization?

1 Like