私信  •  关注

Prateek Chanda

Prateek Chanda 最近创建的主题
Prateek Chanda 最近回复了
6 年前
回复了 Prateek Chanda 创建的主题 » Github:这个分支是X提交的[duplicate]

克隆了分叉存储库后,转到克隆所在的目录路径和Git Bash终端中的几行。

$ cd project-name

$ git remote add upstream https://github.com/user-name/project-name.git
 # Adding the upstream -> the main repo with which you wanna sync

$ git remote -v # you will see the upstream here 

$ git checkout master # see if you are already on master branch

$ git fetch upstream

“fetch”命令对于在项目中保持最新状态是必不可少的:只有在执行“git fetch”时,才会通知您同事推送到远程服务器的更改。

你还可以去 here 供进一步查询