Git学习之远程仓库更新到本地


远程仓库的修改更新到本地仓库

Git学习之远程仓库更新到本地

例如:在远程仓库创建了一个 updating.txt 文件
① git fetch origin master:temp
从远程的origin仓库的master分支下载到本地并创建一个新的分支temp
② git merge temp
③ git branch -d temp
Git学习之远程仓库更新到本地

Git学习之远程仓库更新到本地

PS:
git remote -v 查看远程仓库
git diff temp 比较master 分支与temp的不同
如果分支没有合并到主分支上,用
git branch -D temp 强制删除。