random git things that i use a lot (but forget a lot), and this is a reference for me (lol)
git checkout --orphan branchname
git rm -rf .
lightweight:
git tag v0.18.0
annotated:
git tag -a v0.18.0 -m "my tag message thing here"
lightweight tag later
git tag v0.18.0 40f8746df26d754984e4c92898d751566bc8d0d6
annotated tag later
git tag -a v0.18.0 40f8746df26d754984e4c92898d751566bc8d0d6
push tags
git push origin --tags
show tag data (annotated):
git show v0.18.0
delete tag
git tag -d v0.18.0
delete remote tag
git push origin --delete v0.18.0
checkout tag
git checkout v0.18.0
checkout tag new branch
git checkout -b newbranch v0.18.0
verify signed commit
git verify-commit shashashashashashashasha
checkout pr branch
git fetch origin pull/<ID, like #255>/head:<Branchname>
git checkout <Branchname>
# or just use gh cli lol
# dont do this there are better methods