Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download only changed files git

Tags:

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?

like image 724
instigator Avatar asked Feb 11 '10 15:02

instigator


1 Answers

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.

The important line is this:

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

or in one step:

git pull upstream master

(Examples take from the GitHub link provided above)

like image 85
Doug Neiner Avatar answered Oct 03 '22 02:10

Doug Neiner