I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.
- What is the primary setup? Is there an organization and each official repo is owned by that organization?
- Does every engineer have a fork of each repo they're working on?
- Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
- Do engineers work on feature branches on the main repo or on their own forks?
- Do you require engineers to squash commits and rebase before merging?
- Overall, what is the workflow for getting a new commit into the main repository?
- What sort of hooks do you make use of?
- Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)
- Anything else worth noting?
Thanks very much for your feedback. I plan on coordinating all information into a blog post so we can all benefit from understanding these workflows.
We use github enterprise (hosted internally for security/legal/compliance reasons) for all new Java and JavaScript projects, but we use svn for php still. Because we do continuous deployment we have just one main branch per repo that is pushed to production semi-automatically. (someone needs to push "deploy")
There is an organization and each repo is owned by the org
No
Engineers can push to the official repo. We found pull requests a little unwieldy, its also nice to let developers manager their own merges rather than have huge merges when pulls come in. We might change this someday but it works right now.
Engineers work on trunk on the main repo unless they are doing something major, using github makes it very easy to rollback something that breaks (we also have a jenkins CI tool that emails and stops deploys when builds fail) For java jenkins fires of a maven build and we use grunt for javascript/css builds.
Yes.
Git pull --rebase; Git rebase; git push;
For js we use a jshint precommit hook just locally. We use the email hooks to handle notifications but everything else is handled in jenkins
Not with github. It was down at one point for a few hours but it has been smooth sailing from our pov, no idea how it is going at corp level.
Amazing how much more productive it is for debs. Unforseen benefit is "internal open source". Code sharing is so much easier than with subversion, other teams in our large company can look at our code, fork it have submitted pull requests, which is awesome! Overall, an incredible way to work. Github issues are great too.