Our team have implemented a forking workflow using GIT where
- We have a central repository (master)
- One of the developers is assigned a role of project maintainer
- Another developer has forked the main repository (fork) and pushes local changes to the fork. The project maintainer reviews every commit by the developer to the developers (forked) repository.
- A branch is created for each change.
- A code reviewer reviews every commit pushed to master.
It is the responsibility of the project maintainer to ensure an agreed level of code quality is provided, and to test integration from other developers. So the developer and project maintainer may go through a few iterations of commits before agreeing to push the changes to master.
In addition, the project maintainer may change the developer's code locally before pushing to master.
Currently, all the developers commits are being sent to master. However, what is required is that the commits by the developer do not show on master, but are rolled into a single commit (so to speak) by the maintainer.
FORK MAINTAINERS LOCAL MASTER
-------------------- --------------------------- ----------------------------
dev_branch1:commit 1 dev_branch1:commit 1
dev_branch1:commit 2 dev_branch1:commit 2
dev_branch1:commit 3 dev_branch1:commit 3
[ edits (possibly) ]
qa_branch1: commit 1 qa_branch1: commit 1
How can this be achieved using git. So, in the picture above, the master reviewer should only see commit 1 of the qa_branch1.