aliases | category | classification | date | date_modified | draft | id | image | links | local_archive_links | pinned | series | tags | title | type | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
git |
public |
2020-05-16 14:19:55 -0700 |
2020-05-16 14:19:55 -0700 |
false |
20200516211955 |
false |
false |
|
Git Cheatsheet |
tech-note |
# Set editor:
git config --global core.editor "vim"
# Create tag:
git tag --annotate v0.0.1 --message="Commit message"
# Push annotated tags only:
git push --follow-tags
# Push all tags (lightweight and annotated):
git push origin --tags
git push origin v0.0.1
# Delete tag:
git tag --delete v0.0.1
git push origin --delete v0.0.1
# Show tag data:
git show v0.0.1
# Retrospectively tag (if you forget to tag a commit):
git log --pretty=oneline
git tag -a v1.2 <checksum here (or part of it)>
# Git logging:
git log --pretty=format:"%h %an %ae"