Git 更新某个目录或文件
更新文件
$ git fetch
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 8 (delta 3), reused 8 (delta 3), pack-reused 0
Unpacking objects: 100% (8/8), done.
From github.com:fffy2366/checkout
cd1768d..2408ca5 master -> origin/master
$ git checkout -m 2408ca5 1.php 2.php
更新目录
$ git fetch
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 8 (delta 3), reused 8 (delta 3), pack-reused 0
Unpacking objects: 100% (8/8), done.
From github.com:fffy2366/checkout
cd1768d..2408ca5 master -> origin/master
$ git checkout -m 2408ca5 test1
总结
git fetch
git checkout -m 版本号 文件/文件夹
原文链接:https://www.cnblogs.com/flzs/p/13524199.html