1

I forked a repo and set everything up on my local machine. However, when I do 'git remote -v' it shows the original repo as my fetch and push source. I want it to by from my forked repo. How do I change it over to that without starting all over? And then, how do I add an upstream to the original repo?

Matthew Berman
  • 8,481
  • 10
  • 49
  • 98

1 Answers1

1

From the git remote man page:

 git remote set-url origin https://github.com/user/forkname
 git remote add upstream https://github.com/maintainer/reponame

See also the examples of GitHub: Changing a remote's URL.

set-url

Changes URL remote points to.

You will then be able to fetch from upstream, and push to origin:
See "What is the difference between origin and upstream in Github".

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