0

Do we have anyway to just download content of a branch , and not the repository. I need a branch to do build on a server, So I am interested only in just my files not any repository stuff.

Zoe
  • 23,712
  • 16
  • 99
  • 132
Ahmad
  • 1,960
  • 3
  • 21
  • 33

1 Answers1

0

You should use --single-branch modifier for the git clone. Supposing a branch called my_branch

$ git clone --single-branch --branch my_branch

This will download all history for the branch. Using --depth modifier, you can get only the most recent revisions:

$ git clone --depth 1 --single-branch --branch my_branch

Jean Waghetti
  • 4,571
  • 1
  • 16
  • 28
  • I need just content , no repository stuff. Problem is I have very limited memory on my system. I tried earlier your suggestion already and its throwing OUT OF MEMORY exception. – Ahmad Sep 26 '13 at 10:44