mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-09-19 19:08:54 +02:00
54 lines
734 B
Text
54 lines
734 B
Text
|
title = Creating tags
|
||
|
cards = checkout commit-auto merge reset-hard
|
||
|
|
||
|
[description]
|
||
|
|
||
|
Some of your commits may be special commits. Maybe you reached a milestone or a new version number.
|
||
|
|
||
|
You can mark these commits with a special flag called 'tag'.
|
||
|
|
||
|
Write
|
||
|
|
||
|
git tag <tag-name>
|
||
|
|
||
|
to tag your commit.
|
||
|
|
||
|
---
|
||
|
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 tag -l | wc -l)" -ge 1
|
||
|
|
||
|
[actions]
|
||
|
|
||
|
|
||
|
|
||
|
[congrats]
|
||
|
|
||
|
Nice! You tagged your first commit :)
|