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 Wed, 13 Feb 2019 00:25:22 GMT
On Wed, 13 Feb 2019 at 00:08, Marcelo Vanzin
<vanzin@cloudera.com.invalid> wrote:
>
> On Tue, Feb 12, 2019 at 3:58 PM sebb <sebbaz@gmail.com> wrote:
> > Deleted from local and remote.
> > But it still exists in the upstream from which the Github repo was forked
> >
> > It is still in the upstream source - that is a 3rd party repo
> > How can I restore it from there?
>
> It's easy then:
>
> - make sure you have the upstream repo as a remote (use "git remote
> add" if it's not there)
> - git fetch <original_remote>
>
> Create your local branch:
> - git checkout -b <local_branch> <original_remote>/<branch_name>
>
> Push your local branch to your remote:
> - git push <your_remote> HEAD:<branch_name>
>

Thanks very much, that has restored the branch on my GitHub.

It's shown as one of 'my' branches, but I guess I can live with that.

> --
> 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