commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [OT][GIT help] How to restore a branch in a github fork
Date Tue, 12 Feb 2019 23:57:50 GMT
On Tue, 12 Feb 2019 at 22:34, Marcelo Vanzin
<vanzin@cloudera.com.invalid> wrote:
>
> If:
>
> - you deleted the branch from the remote
>
> Just push your local branch to the remote.
>
> - you deleted the branch from the local repo only
>
> Just checkout the remote branch again. If you had local changes that
> are not in the remote, continue below.
>
> - you deleted the branch from local and it did not exist in the
> remote, or you also deleted from the remote

Deleted from local and remote.
But it still exists in the upstream from which the Github repo was forked

That is the branch I want to restore.

> Check "git reflog" and see if the commits to the deleted branch still
> exist. If they do you can just "checkout" them again.

But how do I restore the branch in my Github fork?

> - if none of the above applies, well, I think you just lost the code.

It is still in the upstream source - that is a 3rd party repo
How can I restore it from there?

> On Tue, Feb 12, 2019 at 2:29 PM sebb <sebbaz@gmail.com> wrote:
> >
> > I have a github fork of a 3rd party repo.
> >
> > Unfortunately I deleted a branch for which I wish to provide patches.
> >
> > Anyone know how to restore/recreate an upstream branch in a Github fork?
> >
> > I cannot destroy and recreate the fork as it has some outstanding PRs.
> >
> > I suppose I could create a second fork, but that seems a bit
> > unnecessary - if only I could recover the missing branch.
> >
> > Any Git gurus here?
> >
> > S.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
> --
> Marcelo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message