Conclusions and further information
OverviewTeaching: 5 min
Exercises: 5 minQuestions
Where can I find out more?Objectives
Reflect on how version control would help with the starting scenario
We’ve seen how we can use version control to:
- Keep track of changes like a lab notebook for code and documents.
- Roll back changes to any point in the history of changes to our files - “undo” and “redo” for files.
- Back up our entire history of changes in various locations.
- Work on our files from multiple locations.
- Identify and resolve conflicts when the same file is edited within two repositories without losing any work.
- Collaboratively work on code or documents or any other files.
Now, consider again our initial scenario:
If someone asks you, “Can you process a new data file in exactly the same way as described in your journal paper? Or can I have the code to do it myself?” You can use your version control logs and tags to easily retrieve the exact version of the code that you used.
Version control serves as a log book for your software and documents, ideas you’ve explored, fixes you’ve made, refactorings you’ve done, false paths you’ve explored - what was changed, who by, when and why - with a powerful undo and redo feature!
It also allows you to work with others on a project, whether that be writing code or papers, down to the level of individual files, without the risk of overwriting and losing each others work, and being able to record and understand who changed what, when, and why.
Upload your own code
If you have code that you’re currently working on, which isn’t under version control create a new repo on GitHub and upload it today!
Find out more…
- Download and install Git on your own computer (it’s free!)
- Atlassian Git tutorials — an excellent resource with clear explanations and illustrations
- Learn Git branching — interactive, visual tutorials
- Visual Git Reference — pictorial representations of what Git commands do
- Pro Git — the “official” online Git book.
- Version control by example — an acclaimed online book on version control by Eric Sink.
- Git beyond the basics — a nice reference slideshow covering some more advanced topics
- Best Practices for Scientific Computing
Please leave some feedback. It’s good to know how things can be improved.
Use version control whenever possible