1

I need fork a branch of a specific project. I have already fork the main branch but now the mantainer has add a new branch for "Development" and I need to download the code and modify something and then send a pull request.

How can I fork a branch?

wallyk
  • 56,922
  • 16
  • 83
  • 148
Christian Giupponi
  • 7,408
  • 11
  • 68
  • 113

1 Answers1

1

You can reuse your existing fork and simply fetch the new branch in your local repo, pushing that branch to your fork.

Your local repo has for remote 'origin' your fork, but you can add another remote "upstream" referencing the mantainer repo.
You can:

  • git fetch upstream,
  • git checkout -b Development upstream/Development
  • git push -u origin Development

(like in "Github: Import upstream branch into fork")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250