[git] BitBucket - download source as ZIP

I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org? In the best way, I am looking for a way to download a project source as ZIP compress file.

This question is related to git download zip bitbucket git-clone

The answer is


For git repositories, to download the latest commit, you can use:

https://bitbucket.org/owner/repository/get/HEAD.zip

For mercurial repositories:

https://bitbucket.org/owner/repository/get/tip.zip


Now Its Updated and very easy to download!

Select your repository from Dashboard or Repository tab.

And then just click on Download tab having icon of download. It will Let you download whole repository in zip format.

enter image description here


I was trying to figure out if it's possible to browse the code of an earlier commit like you can on GitHub and it brought me here. I used the information I found here, and after fiddling around with the urls, I actually found a way to browse code of old commits as well. Even though the question/answer is about downloading the code of an earlier commit, I thought I'd just add an answer for browsing the code also.

When you're browsing your code the URL is something like:

https://bitbucket.org/user/repo/src/

and by adding a commit hash at the end like this:

https://bitbucket.org/user/repo/src/a0328cb

You can browse the code at the point of that commit. I don't understand why there's no dropdown box for choosing a commit directly, the feature is already there. Strange.


Direct download:

Go to the project repository from the dashboard of bitbucket. Select downloads from the left menu. Choose Download repository.

enter image description here


To Download Specific Branch - Go To Downloads from Left panel, Select Branches on Downloads page. It will list all Branches available. Download your desired branch in zip, gz, or bz2 format.

enter image description here


In Bitbucket Server you can do a download by clicking on ... next to the branch and then Download

Bitbucket Server download

For more info see Download an archive from Bitbucket Server


In case you want to download the repo from your shell/terminal it should work like this:

wget https://user:[email protected]/user-name/repo-name/get/master.tar.bz2

or whatever download URL you might have.

Please make sure the user:password are both URL-encoded. So for instance if your username contains the @ symbol then replace it with %40.


Examples related to git

Does the target directory for a git clone have to match the repo name? Git fatal: protocol 'https' is not supported Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) git clone: Authentication failed for <URL> destination path already exists and is not an empty directory SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 GitLab remote: HTTP Basic: Access denied and fatal Authentication How can I switch to another branch in git? VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio?

Examples related to download

how to download file in react js How do I download a file with Angular2 or greater Unknown URL content://downloads/my_downloads python save image from url How to download a file using a Java REST service and a data stream How to download file in swift? Where can I download Eclipse Android bundle? How to download image from url android download pdf from url then open it with a pdf reader Flask Download a File

Examples related to zip

Install php-zip on php 5.6 on Ubuntu 7-Zip command to create and extract a password-protected ZIP file on Windows? How are zlib, gzip and zip related? What do they have in common and how are they different? Read a zipped file as a pandas DataFrame Installing PHP Zip Extension How can you zip or unzip from the script using ONLY Windows' built-in capabilities? Creating a ZIP archive in memory using System.IO.Compression how to zip a folder itself using java Read Content from Files which are inside Zip file Need to ZIP an entire directory using Node.js

Examples related to bitbucket

How to markdown nested list items in Bitbucket? Your configuration specifies to merge with the <branch name> from the remote, but no such ref was fetched.? Bitbucket git credentials if signed up with Google What I can do to resolve "1 commit behind master"? Bitbucket fails to authenticate on git pull Change remote repository credentials (authentication) on Intellij IDEA 14 git: updates were rejected because the remote contains work that you do not have locally How do I push a local repo to Bitbucket using SourceTree without creating a repo on bitbucket first? Clone private git repo with dockerfile How to move git repository with all branches from bitbucket to github?

Examples related to git-clone

Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository git clone from another directory How to git clone a specific tag fatal: could not create work tree dir 'kivy' Unable to Connect to GitHub.com For Cloning Is it possible to find out the users who have checked out my project on GitHub? BitBucket - download source as ZIP "fatal: Not a git repository (or any of the parent directories)" from git status Git clone without .git directory How to get Git to clone into current directory