Git中从远程的分支获取最新的版本到本地方式如下,
如何更新下载到代码到本地,请参阅ice的博客 基于Github参与eoe的开源项目指南
方式一
从上面的结果可以看出,远程仓库有两个,一个是eoecn,一个是origin
2 ,从远程获取最新版本到本地
$ git fetch origin master 这句的意思是:从远程的origin仓库的master分支下载代码到本地的origin master
3. 比较本地的仓库和远程参考的区别
4.把远程下载下来的代码合并到本地仓库,远程的和本地的合并
如何更新下载到代码到本地,请参阅ice的博客 基于Github参与eoe的开源项目指南
方式一
1. 查看远程仓库
$ git remote -v
eoecn https://github.com/eoecn/android-app.git (fetch)
eoecn https://github.com/eoecn/android-app.git (push)
origin https://github.com/com360/android-app.git (fetch)
origin https://github.com/com360/android-app.git (push)
su@SUCHANGLI /e/eoe_client/android-app (master)
从上面的结果可以看出,远程仓库有两个,一个是eoecn,一个是origin
2 ,从远程获取最新版本到本地
$ git fetch origin master
From https://github.com/com360/android-app
* branch master -> FETCH_HEAD
su@SUCHANGLI /e/eoe_client/android-app (master)
$ git fetch origin master 这句的意思是:从远程的origin仓库的master分支下载代码到本地的origin master
3. 比较本地的仓库和远程参考的区别
$ git diff temp
su@SUCHANGLI /e/eoe_client/android-app (master)
4.把远程下载下来的代码合并到本地仓库,远程的和本地的合并
$ git merge origin/master
Already up-to-date.
su@SUCHANGLI /e/eoe_client/android-app (master)