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