I’m going to summarize how our organization has been managing GitHub with an eye on avoiding mishaps and so on. Then I’d like to ask if there are better ways to do this (we now have GitHub enterprise).
We have repos “owned” by the organization and we have developers (myself included) who fork these repos.
Developers push and force-push to their forks as they work on projects.
Then they create PRs to move commits onto the organization repo.
A problem here is that I (a senior engineer) work as a developer but also have authority to merge PRs (modify the organization repos).
So if I was not careful I could - by accident - do a force-push to the organization repo causing serious problems.
To avoid this we - seniors - have two GitHub accounts, one we use for working as developers and another reserved for logging into GitHub and merging PRs etc, this account is only used for this kind of stuff and I actually use Opera browser for this where this browser knows only about my other account that has admin control over the repo.
If I access GitHub through Chrome or via SmartGit (are preferred GUI) then it knows nothing of the other account and knows only about my ordinary developer account.
This pretty much how we’ve worked but are there better options with enterprise?
As I said the goal is to prevent a developer accidentally doing a force-push or other update to an organization repo even if that developer is the person responsible for merging PRs.
PS is there anything like an ability to “elevate” to admin rights (if I have these defined for me) so that unless I explicitly do that my rights are limited to being able to update only my fork of an organization’s repo?