BM: Baca dalam Bahasa Melayu
World 4: Hello GitHub
Tags, SemVer and Releases
You will learn: how to name a version with a tag, number it with SemVer and share it as a release.
The problem
Your diary site works today. Next month, something breaks. How do you find today’s version fast?
Pick one answer.
Watch
A tag: A name stuck on one commit, like v1.0.0. It never moves. is a sticker that never moves. git tag -a v1.0.0 -m "First release" sticks version 1.0.0 on this commit, with a note.
Try it
Semantic Versioning (SemVer): Version numbers in three parts: MAJOR.MINOR.PATCH. numbers have three parts: MAJOR.MINOR.PATCH. Which part goes up?
Drag a card into a box. Or tap the card, then tap the box.
Hint
Does it break old things? Add new things? Or just fix?Try it
Tag your diary as version 1.0.0, with a note.
Hint
-a makes a tag with a note. -m holds the note.Predict
Your tag is on your laptop. Tap Push. Does the tag reach GitHub?
- ea2c020Add purple stylemain (HEAD is here)origin/mainv1.0.0
- f6c78e5Add home page
- 2efd0f2Add README
- ea2c020Add purple stylemain
- f6c78e5Add home page
- 2efd0f2Add README
Tap an action. Watch the courier.
Watch
On GitHub, a release: A GitHub page for one tagged version, with notes and files to download. turns a tag into a page. GitHub can even draft its notes for you. What does a release add on top of a tag?
Pick one answer.
Check
Tag names: clear, or needs work? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
v1.0.0You did it!
You can now tag a version, number it and share it.
Go deeper (optional)
git tag v1.0.0 without -a makes a lightweight tag: just a name, no note. git push origin v1.0.0 sends one tag. git push --follow-tags sends your annotated tags with the commits. Versions like 0.3.0 mean “still early: things may change”.
Bahasa Melayu
Laman diari anda berfungsi hari ini. Bulan depan, ada yang rosak. Macam mana nak cari versi hari ini dengan cepat?
Tag (label) ialah pelekat yang tak pernah bergerak. git tag -a v1.0.0 -m "First release" lekat versi 1.0.0 pada commit ini, dengan nota.
Nombor SemVer ada tiga bahagian: MAJOR.MINOR.PATCH. Bahagian mana yang naik?
Tag diari anda sebagai versi 1.0.0, dengan nota.
-a buat tag dengan nota. -m pegang notanya.Tag anda ada dalam laptop. Tekan Push. Adakah tag itu sampai ke GitHub?
Di GitHub, release (keluaran) jadikan tag satu halaman. GitHub boleh tolong draf notanya. Apa yang release tambah di atas tag?
Nama tag: jelas, atau perlu dibaiki? Leret setiap satu.
Kini anda boleh tag satu versi, nomborkan dengan SemVer dan kongsikannya.
You finished this before. Practice is always welcome!
Official docs: git tag · Semantic Versioning · About releases
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?