dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Add transparent Git+Dolt integration (aka Ressurect git-dolt)

Open kuza55 opened this issue 2 years ago • 2 comments

Hey folks,

My team is currently using DoltHub to store training data and are making modifications to the data in a distributed manner.

I would like git-dolt to be resurrected so that working with git + dolt is easy and people don't forget to run the dolt commands when they run corresponding git commands.

My expectations of what git-dolt would ideally do are:

git checkout loads the corresponding dolt branch git branch makes a new dolt branch git merge merges the appropriate dolt merge git rebase also results in dolt rebase git commit does a dolt commit git push does a dolt push

If the dolt command fails, then the git command should also fail and vice versa - having data merged in dolt without code merged and vice versa would be an ugly situation.

In an ideal world git status would also show dolt status.

In an ideal world this workflow wouldn't require starting/stopping the dolt sql-server.

In an ideal world, a GitHub PR would result in a DoltHub PR and the workflow around those would be nice, alternatively if there is a set of manual steps we need to take, some sort of GitHub commit hook that makes sure we haven't forgotten to do the manual steps would be helpful.

In writing this, I also see that dolt doesn't support rebase; the main use case for us is avoiding interleaving commits from multiple branches when merging into main and squashing branches into single commits. I'm not intimately familiar with rebase myself, so I am not clear on how hard this would be to implement, or if there is a replacement we can do, but wanted to get this out there as a desire.

LMK if these expectations are not currently supported/unrealistic, etc, but I wanted to get my full list of desires out there :)

kuza55 avatar Jun 15 '23 00:06 kuza55

We will look into scheduling this work for you. Just need someone to free up on our side.

timsehn avatar Jun 15 '23 16:06 timsehn

We discussed this with another customer and suggested using Git Hooks (https://git-scm.com/docs/githooks) along with a file in your Git repo where you store metadata about the Dolt repository you want to link. This would allow you to refer to:

  1. A running Dolt locally at a specific branch or commit
  2. Force a clone for say DoltHub.
  3. A Hosted Diolt instance running on the internet.

The solution is very flexible.

This doesn't get everything the customer wants in this issue and requires custom code. But, it is the best option if you want to achieve something like this.

timsehn avatar Nov 03 '23 18:11 timsehn