Git tagging

1) view existing tags in repo

git tag

2) Set a tag on latest commit

git tag -a v1.4 -m 'major release'

3) set a tag on specific commit with commit id

git tag -a v1.2 9fcddd

4) push up tags to repo

git push --tags origin master

5) Delete a tag

remove from repo: git push --delete origin tagname

remove from local: git tag --delete tagname

6) reverting back to a tag. Its best to revert back in a new branch so not to lose commits.

git checkout -b branchname v1.2

or

git reset --hard v1.2

7) See commit attached to the tag

git show v1.2

Comments

Popular posts from this blog

Copy partitioned table schema to another table

Using moment.js

Changing BigQuery table field names