Git tag

Add tag

git tag -a <tag> -m "<message>" [commit hash]

์ด์ „ ์ปค๋ฐ‹์— tag๋ฅผ ๋‹ฌ์•„์•ผํ•˜๋Š” ๊ฒฝ์šฐ commit hash๋ฅผ ์ง€์ •ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

info

tag๋Š” ์ฃผ๋กœ ๋ฒ„์ „ ๊ด€๋ฆฌ์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋ฉ”์‹œ์ง€ ์ œ๋ชฉ์œผ๋กœ ๋ฒ„์ „ ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ์ ๊ณ , ๋‚ด์šฉ์œผ๋กœ ์ด์ „ ๋ฒ„์ „๊ณผ์˜ ์ฐจ์ด์ ์ด๋‚˜ ์ฃผ์š” ์ปค๋ฐ‹ ์ œ๋ชฉ์„ ๋‚˜์—ดํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

git push origin [tag name|--tags]

tag ์ด๋ฆ„ ๋Œ€์‹  --tags ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด ๋ชจ๋“  tag๊ฐ€ push ๋ฉ๋‹ˆ๋‹ค.

Delete tag

git tag -d [tag]
git push origin :tags/[tag name]

Check tag

git tag -l
git show [tag name]
Last updated on