Skip to content

Instantly share code, notes, and snippets.

@peterkeller
Last active July 9, 2021 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterkeller/3078708ba73a6f1bc33be7778374e787 to your computer and use it in GitHub Desktop.
Save peterkeller/3078708ba73a6f1bc33be7778374e787 to your computer and use it in GitHub Desktop.
GIT Tagging
# list tags
git tag
# search tag
git tag -l "1.0.*"
# add lightweight tag
git tag "1.0.0"
# delete local tag '1.0.0'
git tag -d 1.0.0
# delete remote tag '1.0.0'
git push --delete origin 1.0.0
# checkout tag as detached HEAD
git checkout 1.0.0
# checkout tag as a branch
git checkout -b version1_0_0 1.0.0
# what are the most frequently changed files in the last 6 months?
git log --since 6.months.ago --numstat | awk '/^[0-9-]+/{ print $NF}' | sort | uniq -c | sort -nr | head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment