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.
So to preface, my team is using Bitbucket instead of Github, but I feel these services are close enough in feature sets to provide input to your questions:
Yes, we have a single organization that owns all the repos. From what it looks like, all of my team members and I created specific work accounts to join this organization in order to get notifications sent to our work emails.
Our team is small and only a few months old right now, so our process is still becoming solidified as time goes on. Right now, no one does a fork from their main project repo to do work.
Since we all just clone straight from the repos and there are only a couple of components that have consistent multiple contributors. As such, for the team that I am on, we create a feature branch for each task/work item/bug we work on, do our work, and then submit a pull request before code is committed to master. My goal is to get this process adopted by the other teams since it is very useful and we get code reviews "for free".
My team is primarily working from feature branches, but most teams do not from my understanding.
No requirements as this time.
For my team, we create a feature branch, write the code, run unit tests and jshint, create a pull request, review the request, and then the branch is either reworked to incorporate feedback or merged.
I just created hooks this weak for my organization. I have a commit-msg hook to check that a jira task number or [NO-JIRA] tag is included in every commit message. The other hook (i think pre-commit) runs jshint on all my javascript code.
None yet for bitbucket.
We are using hosted Bitbucket.