• tag_project
• git_ws 폴더 하위
$ git clone https://grownje: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@github.com/grownje/tag_project.git
• 파일 이름 : hello.txt
• commit 1 : Hello, world.
• commit 2 : Hello, noma.
• commit 3 : Hello, zerobase.
$ cd tag_project/
$ cat > hello.txt
Hello, world.
$ git add hello.txt
$ git commit -m 'commit 1' hello.txt
$cat > hello.txt
hello, noma.
$ git commit -m "commit2" hello.txt
$ cat > hello.txt
hello, zerobase.
$ git commit -m "commit3" hello.txt
$ git push origin main
현재 버전에 Tag 달기
git tag <tagname>
Git Tag 생성 1 실습
현재 버전 (Commit3) 에 Tag (v0.3) 달기
tag_project % git tag v0.3
특정 버전에 Tag 달기
git tag <tagname> <commithash>
Git Tag 생성 2 실습
특정 버전 (Commit2) 에 Tag (v0.2) 달기
tag_project % git tag v0.2 18b2e87cd44fe902566d7cf0a6692e36bae2817
Tag 확인
tag_project % git log
Tag 를 Remote Repository 에 Push
git push origin <tagname>
Git Tag 생성 3 실습
Tag 를 Remote Repository 에 Push
tag_project % git push origin v0.3
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/zerobasegit/tag_project.git
* [new tag] v0.3 -> v0.3
git tag
git show <tagname>
git tag --delete <tagname>
Git Tag 삭제 1 실습
tag_project % git tag --delete v0.3
Deleted tag 'v0.3' (was 56018a5)
tag_project % git tag
v0.2
git push --delete origin <tagname>
Git Tag 삭제 2 실습
tag_project % git push --delete origin v0.3
To https://github.com/zerobasegit/tag_project.git
- [deleted] v0.3
$ git tag
v0.2
$ git tag --delete v0.2
git log -> commit hash code 확인하고
git tag v0.1 <commithash>
git log -> 태그 달린거 확인
git tag v0.2 <commithash>
git tag v0.3 -> 마지막이니까 hash code 안써도 됨
git tag -> 목록 확인
git show v0.1
git show v0.2
git show v0.3
git push origin v0.1
git push origin v0.2
git push origin v0.3
git tag --delete v0.1
git tag # 삭제확인
git push --delete origin v0.1
V0.2 Tag Local + Remote 에서 지우고 확인
V0.3 Tag Local + Remote 에서 지우고 확인