Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature/lab2 #1545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Feature/lab2 #1545
Changes from all commits
babaf7a3da39eeec6052f3073af1c86cb21028fce6a5ad7daa4f4bcc2731f0b61e1534File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Lab 2 — Version Control Deep Dive
Task 1.1
HEAD
tree 91a347362d22ad74fa68cc00d1cf1217b4d26da1 parent 3efc8cb801d6cd81e19c4036782ed345087f4168 author fishkadealer229 midav.06@mail.ru 1789093477 +0300 committer fishkadealer229 midav.06@mail.ru 1789093477 +0300 gpgsig -----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgRyejrHU8HpFe3DvE8iKkTypR34 bh9igd9HnmjChPuLoAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQEfMkzn7EVRWkoFhlCbp0qfO9Suw4CWt1CbctvTXtCNZ07nxqXrmDzARy4mFJXSlhD zvLLgZ0rr4h1UF04Vg/wc= -----END SSH SIGNATURE-----
docs(lab1): finish submission
Signed-off-by: fishkadealer229 midav.06@mail.ru PS C:\Users\fishkadealer\PycharmProjects\DevOps-Intro> git cat-file -p 91a347362d22ad74fa68cc00d1cf1217b4d26da1
100644 blob 1c0a1e94b7bbdd951f456cda51af6b8484cc3cee .gitignore 100644 blob d10c04c6e7e0014f4fe883599c11747c15012d4e README.md 040000 tree 7d0898a908e274ea809722844cdbd836f3b1c05a app 040000 tree f4f047dd07b128eda5f899dfdaaf193f0291eaa2 labs 040000 tree c0ac2d55cf4335df659b347df3d19d0594a06b6c lectures 040000 tree 6635e259c13bbec9e9bb946641332379ee629b8f submissions
Tree
tree 91a347362d22ad74fa68cc00d1cf1217b4d26da1
Blob
blob 1c0a1e94b7bbdd951f456cda51af6b8484cc3cee
Interpretation
The commit points to a tree, which points to blobs containing file contents. Git connects them through hashes.
File Content (.gitignore)
.gitignore
This .gitignore is inherited by every student fork. Anything listed here
is something a student CANNOT
git addwithout-f. So this file mustONLY contain:
(a) instructor-only paths (refs/), and
(b) machine-generated junk that NOBODY should ever commit.
Do NOT add lab DELIVERABLES here (scan reports, SBOMs, go.sum, k8s
manifests, CI workflows, Dockerfiles, playbooks, dashboards, …). Students
are told to commit those in their submission PRs — ignoring them upstream
silently breaks the lab. When in doubt, leave it OUT of this file.
── Instructor-only ─────────────────────────────────────────────
Reference submissions (dry-run worked examples). Never pushed upstream;
students never see these. This is the one path that is intentionally hidden.
refs/
── Machine-generated junk (no one commits these) ───────────────
Compiled binaries / local runtime state
app/quicknotes app/data/ /quicknotes *.exe
Vagrant runtime state (Lab 5) — the Vagrantfile IS committed; .vagrant/ is not
.vagrant/
Nix build symlinks (Lab 11) — flake.nix + flake.lock ARE committed; result is not
result result-*
Terraform state — MUST never be committed (can contain secrets)
*.tfstate *.tfstate.backup .terraform/
Python virtualenvs / caches
.venv/ pycache/ *.pyc
Editor / IDE
.vscode/ .idea/ *.swp
OS noise
.DS_Store Thumbs.db
Local agent config (not part of the course)
.claude/
NOTE: deliberately NOT ignored, because students commit them as lab evidence:
submissions/labN.md (lab reports)
.github/workflows/*.yml (Lab 3 CI)
Dockerfile, compose.yaml (Lab 6)
ansible/ (Lab 7)
monitoring/ (Lab 8)
.sbom.cdx.json, zap-.html/json, trivy-*.txt (Lab 9 scan evidence)
flake.nix, flake.lock (Lab 11)
wasm/main.go, spin.toml, go.sum (Lab 12)
Task 1.2
ls -la .git/
Mode LastWriteTime Length Name
d----- 11.09.2026 1:58 hooks d----- 11.09.2026 1:58 info d----- 11.09.2026 1:58 logs d----- 11.09.2026 5:24 objects d----- 11.09.2026 1:58 refs -a---- 11.09.2026 4:23 12288 .MERGE_MSG.swp -a---- 11.09.2026 5:24 81 COMMIT_EDITMSG -a---- 11.09.2026 4:15 503 config -a---- 11.09.2026 1:58 73 description -a---- 11.09.2026 4:22 219 FETCH_HEAD -a---- 11.09.2026 5:18 29 HEAD -a---- 11.09.2026 5:24 3267 index -a---- 11.09.2026 4:22 41 ORIG_HEAD -a---- 11.09.2026 1:58 112 packed-refs
Contents of the .git directory, including hidden files
cat .git/HEAD
ref: refs/heads/feature/lab1
contents of the HEAD file
ls .git/refs/heads/
Mode LastWriteTime Length Name
d----- 11.09.2026 5:24 feature -a---- 11.09.2026 4:18 41 main
Listing of the local branch references stored by Git
ls .git/objects/ | head
Mode LastWriteTime Length Name
d----- 11.09.2026 5:04 02 d----- 11.09.2026 2:36 0d d----- 11.09.2026 5:24 0e d----- 11.09.2026 2:44 15 d----- 11.09.2026 5:04 38 d----- 11.09.2026 5:04 39 d----- 11.09.2026 5:04 3e d----- 11.09.2026 2:36 47 d----- 11.09.2026 5:24 66 d----- 11.09.2026 4:13 68
First entries in Git's object database
find .git/objects -type f | wc -l
30
Counts the files stored under .git/objects
Task 1.3
Reflog
f890eba (HEAD -> feature/lab2) HEAD@{0}: reset: moving to HEAD2 d7722bb (origin/feature/lab1, feature/lab1) HEAD@{1}: reset: moving to HEAD2
015ff19 HEAD@{2}: commit: wip(lab2): more progress f3d001b HEAD@{3}: commit: wip(lab2): start d7722bb (origin/feature/lab1, feature/lab1) HEAD@{4}: checkout: moving from feature/lab1 to feature/lab2 d7722bb (origin/feature/lab1, feature/lab1) HEAD@{5}: commit: docs(lab1): finish submission 3efc8cb HEAD@{6}: checkout: moving from main to feature/lab1 babaf7a (origin/main, origin/HEAD, main) HEAD@{7}: checkout: moving from feature/lab1 to main 3efc8cb HEAD@{8}: commit: docs(lab1): finish submission f890eba (HEAD -> feature/lab2) HEAD@{9}: checkout: moving from main to feature/lab1 babaf7a (origin/main, origin/HEAD, main) HEAD@{10}: checkout: moving from feature/lab1 to main f890eba (HEAD -> feature/lab2) HEAD@{11}: checkout: moving from main to feature/lab1 babaf7a (origin/main, origin/HEAD, main) HEAD@{12}: checkout: moving from feature/lab1 to main f890eba (HEAD -> feature/lab2) HEAD@{13}: commit (amend): docs(lab1): finish submission ac39852 HEAD@{14}: reset: moving to HEAD ac39852 HEAD@{15}: commit (amend): docs(lab1): finish submission c0b7c31 HEAD@{16}: checkout: moving from main to feature/lab1 babaf7a (origin/main, origin/HEAD, main) HEAD@{17}: commit: docs: add PR template 9f41b7d HEAD@{18}: checkout: moving from feature/lab1 to main c0b7c31 HEAD@{19}: commit: Task 1 finalization 1565256 HEAD@{20}: checkout: moving from main to feature/lab1 9f41b7d HEAD@{21}: checkout: moving from feature/lab1 to main 1565256 HEAD@{22}: commit (amend): docs(lab1): start submission e127033 HEAD@{23}: commit (amend): docs(lab1): start submission 9b441f7 HEAD@{24}: commit (amend): docs(lab1): start submission f3602cb HEAD@{25}: commit (amend): docs(lab1): start submission 8cc608f HEAD@{26}: commit: docs(lab1): start submission 9f41b7d HEAD@{27}: checkout: moving from main to feature/lab1 9f41b7d HEAD@{28}: clone: from https://github.com/fishkadealer229/DevOps-Intro.git
Recovery
git reset --hard 015ff19 HEAD is now at 015ff19 wip(lab2): more progress
Explanation
If garbage collection ran before recovery, unreachable commits could eventually be pruned
Task 2.1
Signed Tag
git tag -l
v0.1.0-lab2- tag commit
git tag -v
object babaf7a42868658d4bba1b34411ef6c721123358 type commit tag v0.1.0-lab2- tagger fishkadealer229 midav.06@mail.ru 1789095545 +0300
Lab 2 milestone — version control deep dive Good "git" signature with ED25519 key SHA256:qxoWrG/EDJIFi8XJfipCDHRnecGcXiGFr0lkNiizMFY C:\Users\fishkadealer\.ssh\allowed_signers:1: missing key No principal matched.
Task 2.2
Rebase
Before
After
| * 3efc8cb docs(lab1): finish submission | * f890eba docs(lab1): finish submission | * 1565256 docs(lab1): start submission |/
Merge vs Rebase
I would use Merge for parallel development, but Rebase for "conclusion" before local branch integration