Use a publicly accessible repository with version control
Overview
Teaching: 0 min
Exercises: 0 minQuestions
What is version control?
Why would I use version control?
Why would I use a publicly accessible repository?
Objectives
Understand the benefits of version control
Understand the benefits of making your code public
Familiarize with GitHub
Learn how to create a GitHub repository
Recommendation 1
Use a publicly accessible repository with version control.

Version control system
Using a version control system allows you to easily track changes in your software, both your own changes as well as those made by collaborators. There are many flavors of version control systems, ranging from older systems such as CVS and Subversion to more modern ones such as Git, Mercurial, and Bazaar. By configuring your version control system to use GitHub, GitLab or Bitbucket, you’ll even have backups of every version of the software you ever made. Additionally, those platforms offer collaboration tools such as an issue tracker and project management tools, and you’ll be able to use third-party services such as code quality checkers, correctness checkers, and a lot more.
Using a version control system or a cloud storage system?
What is the difference between using a version control system, and using a cloud storage system (Google Drive, DropBox, OneDrive, etc)?
Solution
Version control systems are software tools that keep a track of modifications done to the code. They record all the edits and historical versions of the software. Version control systems can take many forms. For instance, they might store objects in cloud storage.
Cloud storage systems are service models in which data is transmitted and stored on remote storage systems and made available to users over the internet. Too often, cloud storage overwrites previous information.
A cloud storage with version control can prevent loss of information.
Public repositories
Developing scientific software in publicly accessible repositories:
- enables early involvement of users,
- helps build collaborations,
- contributes to the reproducibility of results generated by the software,
- facilitates software reusability,
- and contributes to improving software quality.
Taken together, this ensures that your software has the best chance of being used by as many people as possible while promoting transparency.
Consequences of open sourcing your code
What are the consequences of open sourcing your code?
Getting started with git and GitHub
Although there are different version control systems available,
Git is the most feature-rich, modern and popular by a good margin.
The platforms GitHub.com, Bitbucket.org
and GitLab.com all have smooth integrations with Git.
A good starting point to learn about Git is the Software Carpentry git novice lesson.
Making a public repository on GitHub
Create a public repository onder your own GitHub account, and add a readme file to it.
Solution
In your GitHub account page, click on the plus icon + that is next to your profile picture and choose New repository. In this page, you can type a name in the
Repository namebox. ThePublicoption is selected by default. Also, you can check the boxInitialize this repository with a README. This will create aREADME.mdfile in your new repository.
Key Points
Version control systems help to organize and collaborate on code.
Using a public repository contributes to the reproducibility, reusability and quality of your code.