Skip to content

Commit 6d55946

Browse files
committed
adding force push tag
1 parent f485b5f commit 6d55946

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

git/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Extracts the authors of all commits in a repo and the number of commits they mad
3636

3737
Find large files in a git repo
3838

39+
## force-push-tag.sh
40+
41+
Useful for force pushing / updating a tag so that you can update the tag atomically
42+
3943
## get-full-sha-from-short-sha.sh
4044

4145
Get the full SHA from a short SHA

git/force-push-tag.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# useful for force pushing / updating a tag so that you can update the tag atomically
2+
3+
git tag test # Create tag
4+
git push origin test # Push to remote
5+
git tag test HEAD~2 -f # Forcibly create tag pointing to old version
6+
git push origin test -f # Force overwriting the remote tag

0 commit comments

Comments
 (0)