Now I'm just annoyed that more teams I've been on haven't set this up!
Now I'm just annoyed that more teams I've been on haven't set this up!
I have two git repositories which somehow got into an inconsistent state: How can I reconcile changes in both repositories and resolve conflicts between mutable-metadata (branches, tags) in a sane way?
Alternatively you decide the one of the repositories is the primary one, set up a remote called `mirror` and set-up a `post-receive` hook to:
git push --mirror mirror
Now just ensure no one pushes into the mirror directly. Of course this only works if you control the primary repository.Tags: Don't have a process which can result in tags pushed into different places. It's a path to madness. Same applies to master/release branches.
Yes. This was the case I had in mind. Path to madness.
One serious question though: how do you deal with PRs when you do this? That's one area where it feels like things could be quite messy, especially if you have quite a few PRs going in throughout the day.
Having looked briefly into it now, git-dit does look promising in its approach. I'd be interested to hear from someone who had actually used it and bumped up against the limitations: https://github.com/neithernut/git-dit/blob/master/doc/datamo...
[1]: https://github.com/google/git-appraise
[2]: https://github.com/forgefed/forgefed
[3]: https://drewdevault.com/2018/07/23/Git-is-already-distribute...
If you have any discrepencies in between them, you'll need to merge locally of course.
For most people, it would be just a read-only copy. And the value of that is fairly small.