Skip to content

Instantly share code, notes, and snippets.

View pablo384's full-sized avatar
🎯
Focusing

Pablo Reinoso pablo384

🎯
Focusing
View GitHub Profile
@pablo384
pablo384 / gist:7810636722f2aff280e9064ab3c794f5
Created July 9, 2020 23:22 — forked from dsci/gist:1347672
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@pablo384
pablo384 / git-tag-delete-local-and-remote.sh
Created January 22, 2020 18:24 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@pablo384
pablo384 / previous-git-tag.sh
Created November 8, 2019 15:30 — forked from kjantzer/previous-git-tag.sh
Get Previous Git Tag (the one before the latest tag)
# http://stackoverflow.com/a/28818420/484780
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`