tags:

views:

45

answers:

2

Which would be the simplest git workflow for signing some commits, in order to mark them as having passed a given review, or a set of given reviews?

I suppose tagging them would create too many tags. Creating an intermediate repository with a person responsible for committing (effectively using author/committer duality) would be a bit of overkill.

Is there any other way? We generally use the common structure of remote branches for bigger chunks of work, and direct commits in master for simpler ones.

A: 

You could consider rebasing those commits on top of a review branch, but that would change the SHA1 of said commit, which is bad if they are already pushed to other repos.

Creating an intermediate repository with a person responsible for committing

This is why a push to a dedicated repo is certainly a valid solution, taking advantage of the publication workflow authorized by a DVCS (Distributed Version Control System).

You can then consider that repo as the "one referential", with the official code (i.e. code having been successfully reviewed).

VonC
A: 

You could take a look at the git notes feature. It allows you to attach notes to commits without changing the original objects.

It's also supported by GitHub.

igorw