Version control workflow

One-time tasks/setup, with a focus on CO-specific things. Joining the Cabinet Office’s GitHub team, using the space, and expectations for use.

Don’t spend much time on git status, etc, (there’s already lots out there abvout this) but instead prefer to talk about things like .gitignore, branching, PRs.

Set up

You should:

If you are in Cabinet Office and don’t have administrator access to your machine, you will need to make a request for Git to be installed for you. Raise a service request from the IT Service desk with the following answers:

  • Software type: Analytical Software
  • Software name: Other
  • If other, please enter required software name: Git
  • Is this software chargeable?: No

And here’s an example use justification (tailor for your needs):

I need Git to version control my code and work collaboratively with analysts in my team and across the department. Version control will reduce the chance for errors and minimise the storage burden of our work. It also allows us to work in the open by pushing the version histories to GitHub, a website and cloud storage service. Working in the open is Principle 10 of the Government Design Principles: https://www.gov.uk/guidance/government-design-principles#make-things-open-it-makes-things-better

We have a Cabinet Office GitHub team.

Use

You should:

  • use branches
  • give your branches informative names
  • use the issues log to track problems and ideas
  • use pull requests with at least one other person to