mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-09-15 20:09:37 +02:00
50 lines
729 B
Text
50 lines
729 B
Text
title = Tagging later
|
|
cards = checkout commit-auto merge reset-hard
|
|
|
|
[description]
|
|
|
|
But what happens if you forgot to tag your current commit?
|
|
No Prob! You can also tag older commits via
|
|
|
|
git tag <tag-name> <commit-hash>
|
|
|
|
Tag the commit "Adding feature 2" with the name "v1"!
|
|
|
|
---
|
|
tipp1
|
|
---
|
|
tipp2
|
|
---
|
|
tipp3
|
|
|
|
[setup]
|
|
|
|
echo "event 1" > feature-list
|
|
|
|
git add .
|
|
git commit -m "Adding feature 1"
|
|
|
|
echo "event 2" >> feature-list
|
|
|
|
git add .
|
|
git commit -m "Adding feature 2"
|
|
|
|
echo "event 3" >> feature-list
|
|
|
|
git add .
|
|
git commit -m "Adding feature 3"
|
|
|
|
git checkout --detach main
|
|
|
|
[win]
|
|
|
|
# Did you create a new tag?
|
|
test "$(git show v1 -s --format=%h)" = "$(git show HEAD~1 -s --format=%h)"
|
|
|
|
[actions]
|
|
|
|
|
|
|
|
[congrats]
|
|
|
|
Well done :)
|