Day 2: Branching, Merging and collaboration workflows
November 10, 2026
Invite your team mate and accept their invitation
Complete the invitation task from day 1 (tab “Homework”)
Basic Git workflow:
Basic Git workflow:
Git is a distributed version control system
In Git language, this is called cloning
In Git language, this is called cloning
You can clone
All you need is the URL of the remote repository
Clone your team mate’s cook book repo
Details in Task 1 “Clone”
git pushgit pullmain is the default one.This works well if
Get the changes of your team mate from the remote.
This workflow starts to be problematic when
Advantages of this approach
To create and work on a separate branch:
To bring changes to the main branch you need to merge them.
Git merge brings the commits from the branch to main
To bring changes to the main branch you need to merge them.
If there was a commit in main, a merge commit is introduced.
Create a branch and merge it in your team mate’s cook book
Complete task 2 “Branch and merge”
A pull request is basically asking your collaborators:
What do you think of my changes? Can we integrate them in main or do we still need to change something?
GitHub has nice features for pull requests, e.g.:
A pull request is merged on GitHub when everyone agreed on the code.
Create a pull request on your team mate’s repo
Complete task 3 “Pull requests”
Review and merge the pull request in your own repo
Complete task 4 “Review and merge”
.gitignoreSome essentials that will improve your published repository:
If you are interested, browse some nice GitHub repositories for inspiration (e.g. Computational notebooks guide)
Check out the resources page and the different How-tos for more info and practice.
Questions?
Git marks the conflicting lines in the file:
<<<<<<< HEAD and =======: version on your current branch (main)======= and >>>>>>> more-sugar: version on the branch you mergeMany editors highlight conflicts and let you choose a version with one click, e.g. VS Code:
GitHub Desktop warns you before the merge
When all conflicts are resolved, finish the merge with Continue merge (or go back with Abort merge)
git merge more-sugar reports the conflictgit status shows the conflicted filesgit add <file> and git commit to finish the mergegit merge --abortBranching, Merging and Collaboration with Git