Tuesday, November 27, 2012

Git Tag

Tag  (people use this functionality to mark release points)

git tag  -- Listing Your Tags

git tag -l ’v1.4.2.*’  -- wildcard Tag listing

git tag v1.4    -- Creates Lightweight Tag

git tag -a v1.4 -m ’my version 1.4’  -- Creates Annotated Tag

git tag -s v1.5 -m ’my signed 1.5 tag’ -- sign your tags with GPG, assuming you have a private key.

git show v1.4  -- Shows the last commit of a Tag

git tag -a v1.2 9fceb02  -- Tagging later (if you forgot to Tag a release point)

git push origin v1.2  -- Sharing Tags (pushing to remote origin)

git push origin --tags --  Transfer all of your tags to the remote server that are not already there

git tag -d v1.2 -- Delete a Tag

git checkout -b v1.4-fixes v1.4  -- Creates a branch(v1.4-fixes) from Tag(v1.4)

git diff v1.1 v1.2 --stat  --  Shows no of files changed between two tags

git log --pretty=oneline v1.1..v1.2   -- 
Shows no of commits between two tags