Git Advanced
This is a README.adoc file. The original repository is located here.
Task Git Advanced
Fenrir ID:
git/ad-nib
Points:50
Task submission
Do not create any merge request! Just push all the branches to the remote repository.
Tests check each commit’s hash: do not create any extra commits unless it is stated. Use detached mode to check out to the required branch and create a local branch from the commit you’ve switched to.
Each part adds 10 points to the final score.
Task description
The task sources are available here. Add this repository as a remote and fetch all branches.
Part 1 (Task rebase)
Switch to the rebase branch and apply these changes:
-
Rename
naplestonapoli -
Drop
genovacommit -
Developers forgot to make
script.shexecutable inroma: fix it -
Squash
firenzeandbolognainto a single commit withtorinomessage andfirenze & bolognabody
Part 2 (Task ignore)
Use
supplementarybranch to find the sources
Create branch ignore from the main branch in foreign.bundle. Add .gitignore file which:
-
Forbids to commit
bindirectory -
Forbids to commit any file with extension
.oexcepto.oin the project’s root directory
| Only one commit is allowed apart from the bundle’s commits. |
Part 3 (Task hooks)
Sometimes developers forget to make .sh-scripts executable.
Create a git hook which corrects this mistake.
To use the hook create an additional script install
which installs the hook. The solution must be committed to the hooks branch.
|
Use the following templates:
|
Part 4 (Task submodules)
Create a public fork of this repository. The fork must be located in your user’s namespace. The fork name must be koshej.
Add the fork as a submodule to your project (branch submodules). It must be cloned to koshchei directory.
Add this repository as another submodule. It must be cloned to oak/hare directory.
Create a script setup.sh which downloads the data from all the repositories and updates all the dependencies (e.g. one of submodules might be outdated by default). The solution must be committed to submodules branch.
| Use http links instead of ssh ones! |
Questions
-
What happens to commits when an interactive rebase is used?
-
How to use/extract files from another branch? (Try to use commands from the previous task)
-
What happens when you try to merge branches that have no common ancestor?
-
Which sequence of commands does GitLab/GitHub use to create a fork?
-
Provide a scenario when the committer and the author differ without any explicit modifications.
Copyright
The project is licensed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
© 2026-present Iwan Kalinin <koefic.cien@gmail.com>