Collaborative distributed version control and troubleshooting @ KIT
This material was originally developed by CodeRefinery. The original material is visible here and here. Pull requests and fixes are welcome!
The content of this workshop can be roughly divided in two parts.
Effective collaborative software development
How can we share work on a repository of files with others on the internet?
Share an archive of the directory using email or using some file sharing service: This would lead to many back and forth emails and would be difficult keep all copies synchronized.
One person’s repository on the web: allows one person to keep track of more projects, gain visibility, feedback, and recognition.
Common repository for a group: everyone can directly update the same repository. Good for small groups.
Forks or copies with different owners: anyone can suggest changes, even without advance permission. Maintainers approve what they agree with.
Being able to share more easily (going down the above list) is transformative, because it allows projects to scale to a new level. This can’t be done without proper tools.
We will discuss
the centralized as well as the forking workflows.
During the workshop,
you will collaborate in small groups using the same forge.
Some of the details might not apply to the forge you are using,
please focus on the general ideas.
Fixing problems using Git, and fixing Git problems
Version Control has been sometimes described as “an unlimited undo button”, that offers important ways to tackle problems and gain insight during development (typically, software development), by inspecting the history and the state of all the files involved.
Of course, using a new tool can introduce additional complexity on top of an already complex workflow. Being in control of the tool can guarantee a much productive and stress-free experience, especially when collaborating with other people.
Expected learning outcomes
Objectives
Be able to collaborate with others on remote repositories hosted on Git Forges (e.g., GitHub, GitLab and other similar services);
Be able to use git tools to diagnose and fix problems in code or documents (the content of the repository);
Be able to fix common issues encountered when deviating from the simplest workflow (pull - add - commit - push);
Bonus point: fix issues in this repository
Prerequisites
Basic understanding of Git.
You need an account on a “Forge”, e.g.
- Quick recap on Git Basics: Commits and Branches
- Beyond add and commit: undoing mistakes
- Inspecting history
- Optional: Git Internals
- Operating on Branches
- Concepts around collaboration
- Collaborating within the same repository: issues and pull requests
- Code review demo
- How to contribute changes to repositories that belong to others
- Interrupted work
- Tooling and practices that you might find useful
- Merge and beyond