Git Cheatsheet

# 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"

About

I'm a technology professional who's been passionate about computers since my Grandad introduced me to an Intel 386 back in the 90s when I was a kid. Those moments inspired a passion within for technology, and I've been playing around with anything with a circuit board ever since. Whenever I have a moment you can probably find me working on something computer-related, and this is where I like to write about those moments.