#!/bin/bash
# 11_tags.sh - תיוג גרסאות עם tags

# רשימת tags קיימים
git tag

# יצירת lightweight tag
git tag v1.0.0

# יצירת annotated tag (מומלץ ל-releases)
git tag -a v1.1.0 -m "Release version 1.1.0

- Add user profile page
- Fix login race condition"

# tag על commit ספציפי
git tag -a v0.9.0 a3f5c2d -m "Beta release"

# הצגת פרטי tag
git show v1.1.0

# סינון לפי תבנית
git tag -l "v1.*"

# דחיפת tag ספציפי לשרת
git push origin v1.1.0

# דחיפת כל ה-tags
git push origin --tags

# checkout ל-tag (detached HEAD)
git checkout v1.0.0

# יצירת branch מ-tag (לדוגמה ל-hotfix)
git checkout -b hotfix/v1.0.1 v1.0.0

# מציאת ה-tag הקרוב ביותר ל-HEAD
git describe --tags

# מחיקת tag מקומי
git tag -d v0.9.0

# מחיקת tag מהשרת
git push origin --delete v0.9.0
