Download only modified git files

I have forked a project on GitHub and I want to download only modified files from the source repo. Can this be done?

+4
source share
2 answers

Yes and no. You should get a complete repo, but when you merge it locally, it only contributes the modified files. Below is a walkthrough .

The important line is this:

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

And then the actual extraction / merging can be done as follows (two steps):

 git fetch upstream master git merge upstream/master 

or in one step:

 git pull upstream master 

(Examples taken from the GitHub link above)

+8
source

git fetch (or git pull for auto merge)

+1
source

Source: https://habr.com/ru/post/1301008/


All Articles