twosigma / twosigma/git-meta

Provide option to enable pushing submodule commits to a branch of the same name as the destination meta commit

Open
#726 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
233
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Our typical workflow very much depends on branches across multiple repos. The meta repo state that should be recorded for every commit should not only record the hash of the subrepos, but also the branch of the subrepo. This branch info is pretty important.

Envisoned workflow:

```
git meta checkout -b release_v1
for all subrepos:
git checkout -b release_v1
git push -u origin release_v1
git meta commit -a -m "Created release_v1 branch" # records "current" branch for all open subrepos
git meta push
```

The next time we need to do a hotfix on the release branch, what I'd like to do:

```
git clone meta
git meta checkout release_v1
git open some_subrepo # Exactly the same as today, but create a local branch with the name of the recorded branch. Set tracking of the local branch to remote branch (if it exists).
```

At this point, if someone else has directly made updates to branch some_subrepo/release_v1, I can just to a "git pull --fast-forward" to bring things up to date.

Without his branch info, we have to manually guess or somehow record as part of the commit what the "working branch" was at the time of the "git meta commit". A meta branch could potentially mix and match subrepo branches (i.e. meta:feature_a = subrepo1:master + subrepo2:feature_a + subrepo3:feature_b). On a new clone, we want to know which branch we should continue to work on for each subrepo.

The "git meta" can remain lightweight and not push branch names upstream, and leave this as a manual step for each subrepo.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.