Version control - intro
Contents
Version control - introΒΆ
Each and every project depends on a large amount of files, no matter if documentation
, notes
or analyses scripts
. All of them will change more or less prominently during the project and your research workflows: updates
, deletions
, etc. . If not taken care of, all these changes to all these files can result in tremendous problems concerning data management
and reproducibility
. Just imagine youβre trying out a few new things in your analysis scripts
and after trying to rerun the things you did some days ago nothing works anymoreβ¦ At what point did you change what aspects, when did it break, what happened? What keeping track of changes, thereβs no way to recover this information.
What most folks is to have multiple versions of the same files simultaneously, using file names to indicate or refer to a certain status. However, this is very cumbersome and also prone to errors. A fantastic alternative is to use an approach called version control that allows you to keep track of changes to basically any file, recover previous versions, collaborative editing and much more. Within this session, we will discuss the basics and start to explore one of the central tools, git, as well as resources that build upon it, i.e. GitHub.
Content π‘π©π½βπ«ΒΆ
In the following youβll find the objectives
and materials
for each of the topics weβll discuss during this session. The main materials will be a slide
deck that entails the respective information and practical hands-on sections.
Objectives πΒΆ
Learn about
Version Control Systems
Learn about
Git
Get first experience working with
Git
:creating a new
repository
adding
andmodifying
filesworking with
branches
Learn about remotes and
GitHub
Materials πΒΆ
You can find the slides
here or download them directly.
As with the remaining sessions, the recording will be added in a bit.
Questions you should be able to answer based on this lecture π₯οΈβπ½πΒΆ
What kind of files should you track with version control systems?
Pretty much everything, including text files, scripts and data, but for bid files you should use git-annex or datalad.
Do you need internet to work with your Git repository?
No! Git is a distributed system without the central server. You can have everything on your laptop.
What are the three stages of files under Git?
Modified, Staged, and Committed (or Unmodified)