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

查看远程分支

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



作者:冰西瓜大郎
链接:https://www.jianshu.com/p/fabdaac8eb3e
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

猜你喜欢

转载自my.oschina.net/u/3797187/blog/1810329