Skip to content

Instantly share code, notes, and snippets.

@larsxschneider
Created March 27, 2018 16:37
Show Gist options
  • Save larsxschneider/59293542b448c39cffcb76682321204e to your computer and use it in GitHub Desktop.
Save larsxschneider/59293542b448c39cffcb76682321204e to your computer and use it in GitHub Desktop.
GitHub Spring Cleaning 2018 template

GitHub Spring Cleaning 2018

Over the last year, we at ACME have leveraged GitHub Enterprise more than ever. Amongst many other products, A, B, and C have already moved to Git, and D will follow them soon. As with every heavily used platform, we need to clean up once in a while. Therefore, we want to invite you to join our GitHub Spring Cleaning Initiative 2018.

How Can You Help?

GitHub is used by more than x ACME engineers every day, empowering them to develop effectively with little admin assistance. Developers can create repositories, branches, and pretty much everything else completely on their own. However, “with freedom comes responsibility”, and therefore, we need your help to clean up and follow best practices in the areas explained below.

Update Your Local Git Version

Git is under active development and improving every day. Over the last year, we at ACME have contributed lots of changes to Git, including substantial improvements to Git LFS. We want you to leverage all these improvements.

Please run <<INSTRUCTIONS>> to get the latest Git version on your local machine.

Protect Your Branches

Every project on GitHub has a long-lived master branch and, maybe, other long-lived release branches. As of today, only x% of all ACME repositories have protected branches!

Please protect these branches to ensure that they cannot be deleted or rewritten by accident.

Clone Only Once

On a peak weekday, Git clones generate up to x terabyte of network traffic. This congests the network and slows down operations for everyone else. What is more alarming is that all this cloning is generally not necessary. With Git, you should clone a repository only once to a given machine. Every subsequent change should only be fetched.

If your project is on our unnecessary traffic list, then please contact <<CONTACT>> to workout a solution with us.

Use GitHub Webhooks

A number of non-standard processes at ACME poll GitHub for code changes regularly (for instance, every minute). All these requests keep our server busy and are generally unnecessary, as GitHub provides webhooks that notify a process about changes.

Please check if your project excessively polls Git or the GitHub API and contact <<CONTACT>> if you want our help to work out a solution.

Mark Inactive Organizations as “Discarded”

As of today, more than x organizations on ghe.company.com have not been used for more than a year.

If one of these inactive organizations is yours, then please prefix it with “discarded-” or tell us to prefix it.

Later in the year, we will archive all repositories in organizations with the “discarded-” prefix. This helps you focus on relevant code when searching GitHub.

Move Active Repositories to Organizations

GitHub repositories are either located in organizations or personal spaces (https://ghe.acme.com/[your-login]). Source code that is relevant to the company should always reside in organizations, especially if multiple people work on it. In this way, the code stays accessible even if the employee owning the repository leaves the company.

Please check our list of repositories that reside in personal spaces and are used by multiple people. If your repository is amongst them, then please transfer it to an organization or contact <<CONTACT>>.

Remove Forks

As discussed in our Talk, don't Fork! blog post, forks to organizations are discouraged. As of today, we have x forks in organizations.

Please check our fork list and try to remove your forks.

Use Tokens for Authentication

As discussed in XYZ, you should not clone or fetch changes from Git with your ACME credentials, as this can overload ACME’s Active Directory system. This is in particular the case for service accounts.

Please check our list to see if your account is affected. If your account is affected, then you can use <<INSTRUCTIONS>> to set up a token or contact <<CONTACT>>.

Migrate Legacy Admin Teams

GitHub improved they way teams are internally implemented in 2015. Unfortunately, we still have x teams using the old implementation, which causes inefficiencies in certain GitHub server processes.

Please check our list to see if your organization/team is affected. If that is the case, then please migrate your team or contact <<CONTACT>>.

Further Questions or Feedback?

Please add a comment below or post your question and feedback on <<CONTACT>>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment