Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign a tag to the orphaned commit in GitHub?

Tags:

I have an orphaned commit produced by another person, and I see it in GitHub GUI. This commit is not accessible by cloning the repository as there are no branches/tags that contain this commit on the path. Assuming that the author of the commit has removed his local repository, I wish to assign a branch/tag to this commit directly in GitHub.

This commit can be seen just using a direct link that I can use because it's git hash is known. The commit is not seen in the Insights>Network however.

How can I assign a tag to the commit from this commit page in GitHub? Is that possible to create a new branch directly from this page? What are other ways to return this commit back in service?

like image 569
Dmitry Kuzminov Avatar asked Oct 16 '20 22:10

Dmitry Kuzminov


1 Answers

Making an orphan commit cloneable again

Orphan commits that reside only on the remote (as long as garbage collection allows) cannot be cloned.

Through the Github web interface, using a direct link (e.g. https://github.com/<user>/<repository>/tree/<orphan-commit>) to the tree object connected to an orphan commit, you can access the Create Branch interface to create a new branch based on <orphan-commit> (which you already know the hash of) and make the object cloneable again.

enter image description here

like image 127
zrrbite Avatar answered Sep 30 '22 18:09

zrrbite