Git is a skill that is easier to learn by doing it rather than trying to memorise commands. This series of exercises uses the gitruler tool to allow you to check your skills as you progress.
Before you run these exercises you will need to download gitruler.jar
from https://github.com/rcraggs/gitruler/releases/latest.
Each of the exercises can be completed as follows:
- Clone or Fork the exercise. Instructions can be found in the "Cloning an existing repository" section of Pro Git book and on the Github help pages.
- Follow the instructions to perform updates on the repository that you have cloned. Use the resources and your own research to learn how to complete the exercises - that's the key part of the learning process.
- Continually run
java -jar <path-to-gitrule.jar>
to check your progress. Once you are finished push your repository.
- Section A - configuring git, committing updates to tracked files and pushing changes to origin.
- Section B - Tracking a new file, staging specific files for a commit and checking the repository status.
- Section C - Ignoring moving and removing files in git.
- Section D - Tagging and using git to view a log of commits and differences between versions.
- Section E - Branching and merging and resolving merge conflicts.