仅下载更改的文件git [英] Download only changed files git

查看:75
本文介绍了仅下载更改的文件git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GitHub上创建了一个项目,我只想从原始存储库中下载更改的文件.可以这样做吗?

I have forked a project on GitHub and I want to download only the changed files from the original repo. Is it possible to do this?

推荐答案

是,不是.您必须获取整个存储库,但是当您在本地合并它时,它只会带来更改的文件.这里有一个演练.

Yes and no. You have to get the whole repo, but when you merge it locally, it only brings in the changed files. There is a walkthrough here.

重要的是:

git remote add upstream git://github.com/original/repo.git

然后可以像这样完成实际的获取/合并(两个步骤):

And then the actual fetching/merging can be done like this (two steps):

git fetch upstream master
git merge upstream/master

或一步:

git pull upstream master

(示例取自上面提供的GitHub链接)

(Examples take from the GitHub link provided above)

这篇关于仅下载更改的文件git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆