Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to download the full history from GitHub?

Tags:

git

github

I have just started using GitHub, and after making a few changes to some files in my repository, I downloaded the repository as a zip file. I get only the latest versions of all the files there. I can see the history online, however. Is there a way to get all the versions I contributed in a zip file?

like image 583
Danny Avatar asked Jul 28 '15 17:07

Danny


People also ask

Does git download all history?

Use git pull --unshallow and it will download the entire commit history.

How do I download everything from GitHub?

To download from GitHub, you should navigate to the top level of the project (SDN in this case) and then a green "Code" download button will be visible on the right. Choose the Download ZIP option from the Code pull-down menu. That ZIP file will contain the entire repository content, including the area you wanted.

How do I get to git history?

Git file History provides information about the commit history associated with a file. To use it: Go to your project's Repository > Files. In the upper right corner, select History.

Does GitHub keep history?

On GitHub, you can see the commit history of a repository by: Navigating directly to the commits page of a repository. Clicking on a file, then clicking History, to get to the commit history for a specific file.


1 Answers

Github is a site that hosts git repositories. The download as ZIP feature isn't for getting a local copy of the repository, it just downloads the view of the repository that you are viewing at that time (the master branch, for example). This is more for getting a specific version of the software.

If you wish to contribute to the repository, you should instead be cloning using the git command line tool:

git clone https://github.com/someuser/some-repo.git

This gives you a copy of the repository. A complete copy, histroy and all. You would then interact with the repository on your local machine, and push and pull changes as allowed by the permissions on github.

Typically, you'll actually fork a repository to your account, and push and pull changes to that copy, and then send the original repo a pull request when you want your changes to be included in the primary version.

like image 122
DVG Avatar answered Oct 17 '22 16:10

DVG