Git Branches and Collaboration
In this weekβs workshop, we will dive deeper into version control using Git. You will learn how to work with branches, resolve merge conflicts, and collaborate with others on a shared repository.
Introduction
Live coding
Review the material that we explored in Week 2βs live-coding session.
Lab
Exercise: Simulate a Git collaboration workflow
Your task is to:
- Pull latest changes from ISIC-ISCO-CODER.
- Create a new branch (e.g
ose-feature). - Modify
hello_NBS.pyand changecountryname to one of your choice. - Stage your changes.
- Commit your changes.
- Push the branch to GitHub.
- Open a pull request for review.
Further reading
- Loeliger, J., & McCullough, M. (2012). Version Control with Git, 2nd Edition. OβReilly Media. https://www.oreilly.com/library/view/version-control-with/9781449345037/.
- Bryan, J. (2018b), Happy Git and GitHub for the useR. GitHub. https://happygitwithr.com
- Oh Shit, Git!?! https://ohshitgit.com/
- Git SCM. Official Git Documentation. https://git-scm.com/docs/gittutorial.
- Visual Studio Code. (2022, May 27). Using Git with Visual Studio Code [Video]. YouTube. https://www.youtube.com/watch?v=i_23KUAEtUM