Git is a version control system (VCS) and is one of the most widely used systems for software development. Git is a distributed VCS that allows many developers to work simultaneously on the same project code by allowing multiple branches, incremental improvements to be peer reviewed, then included back to the project.
Think of it like track-changes for document files, however much more useful as it allows multiple authors to work on the document simultaneously, and it avoids having to pass the document back and forth via some other communication mechanism (email for example).
Git is also the underlying technology of both GitHub.
GitLab is used to manage website projects on the CWP. It enables sharing, collaboration, and audit trails of the code worked on by development teams. It is run securely on the CWP infrastructure which is based within New Zealand. GitlLab is a private code repository, agencies are able to choose who has access to their GitLab projects and therefore what code modules they share.
When a site is provisioned on the CWP, a Gitlab repository is also provisioned. Access to accounts can be granted to agency ICT staff and vendors working on their behalf. CWP GitLab is not open to the wider Free Open Source Software (FOSS) community to contribute.
On Gitlab an agency does have the ability to share their code with other agencies within CWP GitLab. As CWP Gitlab is only accessible to other CWP sites (and their development partners), it has a reduced audience. It is therefore recommended that when an agency would like to create or release a module for sharing they use GitHub, as it is open to the wider FOSS community.
GitHub(external link) is a social coding platform that allows teams to collaborate among themselves or with the general public and has quickly become the go-to social network for the Free Open Source Software (FOSS) community. To use GitHub agencies should create an organisation account. You can have multiple developers an organisational account. The account is free for public projects, which suits CWP as we have Gitlab for private code.
The SilverStripe CMS core and many of the modules utilised on the CWP are maintained and actively worked on by the community via GitHub. It is in effect the social network of the SilverStripe CMS community, complemented by other digital channels such as mailing lists, forums and IRC chat.
GitHub has an international Government Community of Practice(external link) that any government staff with an agency email address account associated with their GitHub account can access and discuss the ideas of code sharing, open innovation, and the use of social coding platforms within government.
Git has a distributed publishing model, which allows modules started on CWP GitLab and later moved to the open code sharing space, GitHub. This allows agencies the choice to code in a private repository before open sourcing it and making it available to others in the FOSS community. However there are also benefits for starting new open source modules directly within GitHub such as:
Early peer review, which can improve the quality of your code
Interest from other users in the community, which can lead to collaboration on similar pre-existing modules (they might have already done some of the coding for you!)
CWP does allow for modules to be made public on CWP Gitlab to anyone with access. But this is a much smaller community if developers and collaboration is limited by this.
Private project code (code that is not modules and relates to the customisation of SilverStripe CMS) should be kept on CWP GitLab. This space can then be used as a collaborative coding space for the development team doing work on the project. By keeping the private project code within CWP GitLab allows the version control system that Git provides while keeping it private to the project, so that it to be safely deployed on to the CWP stack environments.