参考:
- https://blog.csdn.net/liuchaoxuan/article/details/80656145
- https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository#remotes-and-forks
When a repo is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote named upstream.
git remote add upstream git://github.com/user/repo_name.git

网友评论