0

I have to build a patched kernel based on the 4.1.2 mainline kernel. I know that I need the commit $commit_num. Unfortunately, my network connection is slow, so downloading the whole repo with history would take ages.

Is it possible to download only this one commit? I don't have the repo cloned.

marmistrz
  • 5,974
  • 10
  • 42
  • 94
  • possible duplicate of [Pull a specific commit from a remote Git repository](http://stackoverflow.com/questions/14872486/pull-a-specific-commit-from-a-remote-git-repository) – jub0bs Aug 20 '15 at 14:33

2 Answers2

1

According to the answer here, the only thing you can try is

git archive -o kernel.tar --remote=git://${YOUR_GIT_REPO_URL} ${YOUR_GIT_HASH}

Community
  • 1
  • 1
Martin Seeler
  • 6,874
  • 3
  • 33
  • 45
0

If the host allows it, you can use git archive to get a zipped up tree of files:

git archive --format=zip --remote=git://git.foo.com/project.git <commit-or-tag>
Wolf
  • 4,254
  • 1
  • 21
  • 30