github - Restore remote Git branch -


before go further, let me explain why can't a:

git checkout -b <branch> <sha> 

basically branch (let's call dev1) on developer's machine. had done commits , pushed them up. branch branched branch (we can call features) being renamed development. development created branch of features , features deleted. developer's branch (dev1) deleted other developer both locally , remotely. when using github windows found branches asking pushed, deleted entire folder (which skipped recycle bin) , re-cloned repo. can't a:

git reflog 

because doesn't have history. can't see commits because never pulled locally onto machine.

so, in mind, there way of restoring dev1 branch remotely? have been looking command show remote branches deleted, far, have been unable find such command.

any avoid weeks of development work!

you can use github events api see last 300 events (paginated in 30 events per page) occured during last 90 days user or repo. there can search last push event on branch , sha-1 need reinstantiate branch.

e. g. here can see recent events: https://api.github.com/users/vampire/events, https://api.github.com/users/vampire/events?page=2, a. s. o.

or here events repository vivin/gradle-semantic-build-versioning: https://api.github.com/repos/vivin/gradle-semantic-build-versioning/events, https://api.github.com/repos/vivin/gradle-semantic-build-versioning/events?page=2, a. s. o.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -