On Wednesday, July 31, 2013 11:22:10 AM UTC-4, leam hall wrote:
> I'm trying to design a workflow for our team and could use some advice. My 
> git-fu is young. 
> We have  a remote repo that will store the authoritative code. That will 
> be pulled to a server local repo where the team has access. Each person 
> will clone the local repo into their home directory, edit files, and then 
> push to the local repo. Somehow we will trigger code review and acks, and 
> then someone will push from the local repo to the authoritative repo. 
> What I need help understanding is:
> 1. How to prevent code being pushed from local repo to authoritative until 
> it is reviewed? Is this a process issue or does git have a way to enforce 
> it?

Git itself is only using working conventions. So it's a process external to 
git to actually prevent people from doing (bad?) things.

The easiest setup would be to have:  /local/git/repo-to-review.git   with 
permissions to all dev to write to it. Then have another 
/local/git/authoritative.git which only has write permissions for that 
man-who-will-get-fired-for-merging-bad-code user.

Otherwise, you could use things like bitbucket. Have a repo with one 
read-access to all devs. They would fork into their bitbucket account, then 
clone their bitbucket to their local machine. Make changes to their local 
machine, push code to their bitbucket. Then make a pull request to the 
authoritative bitbucket. The code review process is started and merge if 


> 2. For the few of us who can push from local to authoritative, how do I 
> configure my .gitconfig to normally push to the local repo? My code should 
> be reviewed, just like everyone else's.

If you prefer not relying on the tools like bitbucket but rather have 
convention-accepted process, I would suggest you have the "origin" remote 
being your "dev bitbucket", and have another remote name for the 
authoritative repo. On the example above:

git clone /local/git/repo-to-review.git my-project
cd my-project
git remote add production /local/git/authoritative.git

then it's just that normal work of git checkout and git push and pull...

Thoughts? Pointers to documentation is fine, I just don't know what to look 
> for.
> Leam

Hope this was helpful.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to