fork项目同步步骤(master):
- 查看项目远程仓库的配置。
git remote -v
- 添加源项目A的地址
git remote add upstream SourceProjectAURL
- 确认是否添加成功
git remote -v
- 获取项目A的更新
git fetch upstream
$ git fetch upstream
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (39/39), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 27 (delta 19), reused 0 (delta 0)
Unpacking objects: 100% (27/27), done.
From https://gitlab.devtools.intel.com/cl-pnp/pxe-flash
* [new branch] master -> upstream/master
# git log 是查不出来变化的.
-
合并项目A的同步。mater可指定为项目A某一分支,如feature_A
git merge upstream/master
-
push 到 gitlab
git push origin master
网友评论