On Tue, 12 Feb 2019 at 22:34, Marcelo Vanzin <van...@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 <seb...@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-unsubscr...@commons.apache.org > > For additional commands, e-mail: dev-h...@commons.apache.org > > > > > -- > Marcelo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org