Introduction to version control with Git
2023-06-15
Description
Git is an essential skill if you use any programming language. It allows you to keep track of changes to your project over time, collaborate with others, and maintain a clear and organized project structure. This can save time, improve research efficiency, and also makes it easy to publish your code via platforms such as Github. In this lecture, I will introduce the basic concepts of Git and how to use it for you own projects. The lecture is for Git beginners but also for people who use basic Git for their own projects and want to know a bit more about the concepts behind the workflow.
Summary
Install git for your machine following this guide
Get started
Command line
Follow this Git training for learning the Git concepts in the command line.
R and R Studio
There is a whole book on using Git with R that explains the setup in detail but also goes into more advanced topics.
Follow this step by step guide to set up Git and a Github connection in R and R Studio
Github Desktop
There are detailed step by step guides on how to set up Github Desktop and how to work with in the Github Desktop Documentation
Further links
Learn git concepts, not commands: Blogpost that explains really well the concepts of git, also more advanced ones like rebase
or cherry-pick
.
How to write good commit messages: Blogpost that explains why good commit messages are important and gives 7 rules for writing them.
Git cheat sheet: Always handy if you don’t remember the basic commands