If you know the last sha1 the branch was at, you can do this fairly easily
from your own clone (if it has the commits where the branch was at).
> git branch newbranch <sha>
git push origin newbranch:master
You can probably dig up the sha from the github event log, or you could dig
around in the reflag of the repo you had been pushing from:
git reflog show master
Tekkub
GitHub Tech Support
http://support.github.com/
Join us on IRC: #github on freenode.net
Discussion group: [email protected]
On Sat, Sep 5, 2009 at 4:42 PM, Marcus <[email protected]> wrote:
>
> I accidentally deleted the master branch of my repository.
>
> mar...@marcus-laptop:~/dev/givechange$ git push origin :master
> To [email protected]:mericsson/givechange.git
> - [deleted] master
>
> Any way I can get back the master branch? I believe my only option is
> to push the other branch that I've been working in to master. If I do
> that, can I get back the master branch settings... such as post commit
> pushes? There are also a few other people working in different
> branches (all started from master), will they be affected?
>
> Thanks.
>
> Hoping I didn't just cause myself a serious headache,
> Marcus
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---