Repositories to clone for practicing git operations and situations


(Kristóf Csorba) #1

Hi everyone! I am planning a git on-boarding task set for my students. Even if they know the basics, they are often afraid to rebase, merge, or are too brave and confuse things which they cannot fix.
My plan is to create a set of repositories with tasks to solve. Does anybody know about similar repos already created? If not, should we create one? What should it contain? (I would prefer C#, but it can also be language independent.)

For example:

  • Clone the repsitory aaaa/bbbb1! You are XY and working on branch “dev”. You have just fetched the work of your friends. AB seems to have moved on and implemented a new feature. Your task is now to merge their work with yours. Be careful, there will be merge conflicts and you should make sure that no contribution gets lost.

  • Clone the repository aaaa/bbbb2! You are XY and working on branch “dev”. You have just fetched the work of your friends. AB seems to have merged a feature branch which has overwritten some of your work. Unfortunately, ABCD has added several commits since the merge. Your task is now to restore your work without damaging other contributions. To do this, you have to partially revert the merge commit.


(Gunnar Wolf) #2

I have some practices you could find useful; they are written in Spanish, but an auto-translating tool can help you get to a step from which you can do the editing. Basics of using Git and the GitHub collaboration model, handling parallel development using branches, omitting unneeed files with .gitignore.
I know there’s quite a bit beyond this, but it’s enough of a starter for my students to work from.


(Kari Bancroft) #3

Merge conflicts are one of the hardest things to teach because folks really need practice solving real problems so often. We’ve developed one merge conflict activity that is still contrived but a little bit fun with a bit of “choose your own adventure”. The exercise is also intentionally not a code-based exercise so they can focus on the process.

The activity description is here and the corresponding repository is here.