No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
dangling_commit_stdin.txt
empty-pack-file.txt
git-create-dangling-commit-tag.rb

README.md

Create Tags For Dangling Commits

Sometimes after a force push or deleted ref commits can become unrefenced. If you no longer have access to a machine which contains the commit you'd normally be unable to access the sha.

However if you host your repository on GitHub or BitBucket the SHA will often still be available for a period of time until the repository expereinces a gc event. This tool sends the tag creation command directly to the git server and bypasses local client checks that prevent the creation of tags for non-existant shas.

Usage

ruby git-create-dangling-commit-tag.rb <SHA> <New Tag Name> <Git SSH Remote>
git fetch --tags
git checkout <New Tag Name>