Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I download a zip from github, what is the hex string at the end of the file name represent?

Tags:

git

github

If I go to https://github.com/wesm/pandas and click the "Download" button to download a zip (or tar) archive of the repository, the file name of the archive I get is:

wesm-pandas-0.3.0-93-g1d40e65.zip

I can see that wesm-pandas represents the project name, and 0.3.0 represents the project version.

Does 93 represent the number of commits on that branch?

What does g1d40e65 represent?

like image 522
Daniel Fortunov Avatar asked Jun 13 '11 17:06

Daniel Fortunov


People also ask

How do I download a ZIP file from GitHub?

To simply download a repository as a zip file: add the extra path '/zipball/master/' to the end of the repository URL and voila, it gives you a zip file of the whole lot. It then gives you a zip file to download. Save this answer.

How do I download a hex file from GitHub?

Click on the "Raw" button at the top right and then in the browser do a File -> Save As (or <CTRL>S) and save as a file with a HEX extension.

How do I download directly from GitHub?

Click on the file you wish to download from GitHub to open the individual file. From here, right click the Raw button at the top of the file, select Save Link As… , choose the location on your computer where you want to save the file, and select Save .


1 Answers

After the username and the project, the filename is obtained from the output of:

git describe --always

Example from the man page:

[torvalds@g5 git]$ git describe parent

v1.0.4-14-g2414721

i.e. the current head of my "parent" branch is based on v1.0.4, but since it has a few commits on top of that, describe has added the number of additional commits ("14") and an abbreviated object name for the commit itself ("2414721") at the end.

http://www.kernel.org/pub/software/scm/git/docs/git-describe.html

So in your case, 93 is the number of commits since 0.3.0 and the hex after g is the sha1 of the latest commit

like image 193
manojlds Avatar answered Nov 05 '22 00:11

manojlds