美文网首页
Git之从远程仓库更新代码到本地

Git之从远程仓库更新代码到本地

作者: 冰西瓜大郎 | 来源:发表于2017-07-13 22:46 被阅读0次

多台电脑上进行开发的时候需要用github进行同步

查看远程分支

git remote -v
origin  https://github.com/Link-yu/FlaskProject.git (fetch)
origin  https://github.com/Link-yu/FlaskProject.git (push

从远程获取最新版本到本地

git fetch origin master:temp

比较本地仓库与下载的temp分支

 git diff temp
#q可以退出比较diff

合并temp分支到本地的master分支

git merge temp

删除temp分支

git branch -d temp

相关文章

网友评论

      本文标题:Git之从远程仓库更新代码到本地

      本文链接:https://www.haomeiwen.com/subject/eiighxtx.html