Generally for my longterm clients I host all of the source code of their projects on my own git server. Recently I’ve started working with a couple of organisations on projects where for a variety of reasons it’s better if the source code is ‘somewhere else’.
The most obvious ‘somewhere else’ is Github, and after sending the below instructions to more than one person I decided it would be easier if there was one central location I could direct people to, and others could as well! So here’s the rundown.
Managing source code
For any application – website, mobile app, API etc – the source code needs to be stored somewhere where it’s possible for multiple people and processes to access it. The most common way to do this is to place the source code into something called a version control repository – which does exactly what it says on the tin – it keeps track of versions of the code over time. It also deals with multiple people working on the codebase and ensuring that changes made by one person don’t overwrite those made by another.
One of the most common of these is Github. So that a client organisation maintains full access and control of the source code – even if / when I’m no longer working on the project it’s best that the repository is ‘owned’ by them. This is entirely free on the scale of many projects – Github allows five private repositories, with three collaborators (other people who can access the source code) for each.
The process to get this in place is
- Visit https://github.com/
- On the main page use the Sign up form
- Username: use the name of your organisation, all in lowercase, with no spaces e.g. if your organisation is Flying Fishboats use flyingfishboats, or flying-fishboats. Try and keep it relatively short, so if you’re Flying Fishboats South Inc, then just flying-fishboats is plenty, (or event just fishboats).
- Email: provide an email address for your organisation, consider using a more ‘general’ email address rather than a specific person since that is easier to maintain access to over time.
- Password: provide a secure password, and keep it safe. This email address and password are the ‘master’ for this account!
- Once you’ve signed up, verify the email address used (they send an email to the address you used, you click the link 😉
- Back to https://github.com/ and sign in using the account you just created
- In the top right corner you should see a small + icon – click this, then select New repository
- On the resulting form:
- Leave the owner as your organisation name (e.g. flyingfishboats)
- Give the repository a name which matches its purpose – try and make it relatively specific – e.g. filemaker-integration, upload-processor, teacher-portal.
- Further down the form ensure that you select the radio button to make the repository Private.
- Click Create repository.
- On the next screen it will tell you about ‘Quick setup’ etc – you can ignore all that 🙂 but please select the Settings tab
- On the Settings tab:
- select Collaborators – you may be asked to enter your password again at this point.
- In the ’Search by username…’ field type
steveWinter
and then select the top option from the list – it will show the name Steve Winter beside the username. - Finally select ‘Add collaborator’
And we’re done – that will have sent me an email to allow me to join the repository and push code to it.