可以将项目Fork到你的本地github项目中,也可以clone到你的项目中,然后进行修改。
- 克隆项目到你的本地文件夹中(
cores)
git clone https://github.com/yourname/project.git cores
- 进到
cores目录下,然后增加远程分支,名为Yd到本地
git remote add Yd https://github.com/onetcore/webapi.git
- 运行命令:
git remote -v, 会发现多出来了一个Yd的远程分支
git remote -v
- 然后把远程原始分支
Yd的代码拉到本地
git fetch Yd
- 合并对方远程原始分支
Yd的代码
git merge Yd/master
- 最后把最新的代码推送到你的github上
git push origin master