4

I am a newbie to github and I am required to have an understanding of wireshark by analyzing its source code. The source code is apparently around 23 MB but if I try to do a git clone from the link provided in the website, it turns out to be around 636 MB.

Can someone please shed some light as to why the clone is so big compared to the source code?

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
Ankit
  • 49
  • 2

1 Answers1

9

When you clone a repository with git ... that's what you're doing; cloning a repository. You're getting all the branches and their histories, not just master.

If you really wanted to, you could just get master (or a specific branch) - see: Clone only one branch

Community
  • 1
  • 1
Brian Roach
  • 76,169
  • 12
  • 136
  • 161
  • 5
    +1. And even if there was only one branch, you get the whole history of the sources, and not just the latest version. – JB Nizet Feb 04 '13 at 07:42
  • @JBNizet - tru dat, I'll add to my answer – Brian Roach Feb 04 '13 at 07:43
  • 2
    for those looking for a most recent version, you can use shallow cloning - only clone the last x commits https://www.perforce.com/blog/git-beyond-basics-using-shallow-clones - alternatively, download the _source code_, not the _repository_ – Sandra Dec 06 '17 at 11:10