-1

I have forked a private repo (called X). Now in repo X a branch is created. How do I get the branch in repo X to appear in my fork of repo X?

Example

  1. a private repo is created only has master
  2. I fork private repo
  3. a branch is created in private repo
  4. now what do I do to get this branch in my fork

I would like to have that branch in my fork so that I can work on it and send a pull request for that branch to the original repo.

Thanks

Saad

4

1 回答 1

1

假设您有一个名为“origin”的私有仓库的远程设置,您可以执行以下操作:

git fetch origin                             # fetches history from origin repo
git checkout -b newBranch origin/newBranch   # create a local branch called 'newBranch' that tracks origin's newBranch
于 2013-10-31T12:17:55.257 回答