Skip to content

pcorliss/dangling_commit

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages