Please help me with a Git workflow

Posted by aaron carlino on Stack Overflow See other posts from Stack Overflow or by aaron carlino
Published on 2011-02-03T22:54:55Z Indexed on 2011/02/03 23:25 UTC
Read the original article Hit count: 291

Filed under:
|
|
|

I'm an SVN user hoping to move to Git. I've been reading documentation and tutorials all day, and I still have unanswered questions. I don't know if this workflow will make sense, but here's my situation, and what I would like to get out of my workflow:

  • Multiple developers, all developing locally on their work stations
  • 3 versions of the website: Dev, Staging, Production

Here's my dream:

A developer works locally on his own branch, say "developer1", tests on his local machine, and commits his changes.

Another developer can pull down those changes into his own branch. Merge developer1 -> developer2.

When the work is ready to be seen by the public, I'd like to be able to "push" to Dev, Staging, or Production.

git push origin staging 

or maybe..

git merge developer1 staging

I'm not sure. Like I said, I'm still new to it.

Here are my main questions:

-Do my websites (Dev, Staging, Production) have to be repositories? And do they have to be "bare" in order to be the recipients of new changes?

-Do I want one repository or many, with several branches?

-Does this even make sense, or am I on the wrong path?

I've read a lot of tutorials, so I'm really hoping someone can just help me out with my specific situation. Thanks so much!

© Stack Overflow or respective owner

Related posts about git

Related posts about server