Exercise: using version control¶
In this section we have introduced version control, and outlined how it can be useful for academic research activities, including:
- Capturing a detailed, annotated record of your research;
- Inspecting changes made between any two moments in time;
- Identifying when a specific change was made; and
- Sharing your research with collaborators.
Info
We'd now like you think about how version control might be useful to you and your research.
Have you experienced any issues or challenges in your career where version control would have been helpful? For example:
-
Have you ever looked at some of your older code and had difficulty understanding what it is doing, how it works, or why it was written?
-
Have you ever had difficulties identifying what code and/or data were used to generate a particular analysis or output?
-
Have you ever discovered a bug in your code and tried to identify when it was introduced, or what outputs it might have affected?
-
When collaborating on a research project, have you ever had challenges in making sure that everyone was working with the most recent files?
How can you use version control in your current research project(s)?
-
Do you have an existing project or piece of code that could benefit from being stored in a repository?
-
Have you recently written any code that could be recorded as one or more commits?
-
If so, what would you write for the commit messages?
-
Have you written some exploratory code or analysis that could be stored in a separate branch?
Having looked at the use of version control in the past and present, how would using version control benefit you?