0

I have a repo that is forked, call this myFork. The repo that I forked from, call it upstream.

I set up the upstream repo using this: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork

On myFork, I have 2 branches: master and myDevelop. For master, it is used to track changes to upstream/master. How do I setup so that myDevelop to track upstream/develop only?

To expand the question further, how do I:

  • set xyz branch on myFork to set abc branch on upstream?
mle0312
  • 143
  • 1
  • 11
  • 3
    Does this answer your question? [Make an existing Git branch track a remote branch?](https://stackoverflow.com/questions/520650/make-an-existing-git-branch-track-a-remote-branch) – grg Apr 20 '20 at 22:33
  • Answer already provided at: https://stackoverflow.com/questions/520650/make-an-existing-git-branch-track-a-remote-branch – mle0312 Apr 20 '20 at 23:53

1 Answers1

-1

You can run git branch -vv to show up which remote branch a local branch is tracking.

If you want to base your work on an upstream branch that already exists at the remote, you need to run git fetch to retrieve it first.

Then git checkout abc to select the branch.

Finally, run git branch -u origin/xyz from abc branch to start tracking xyz branch.

M.Z.
  • 174
  • 2
  • 10