Download a repository archive
With Bitbucket Data Center and Server you can download an archive of source files at a particular point in time; you can download your source as a .zip file from the actions dropdown menu from the Source view, Commits list, and Branches list. You can also download the archive of individual branches, commits, and tags.
To download a single file, navigate to the file in the repository, select Raw file and save the file that opens up in your browser.
On this page:
リポジトリのダウンロードとクローンの違い
Cloning a repository copies the source files of a remote repository to your local machine, as well as the repository's Git history (branches, commits, tags, etc.). Cloning also creates a remote connection (usually called origin) pointing back to the cloned repository. You can only clone into a local directory that is a properly initialized Git repository (using the git init
command).
Downloading a repository archive only copies a repository's source files from a specific point in time, depending on what was chosen to be copied. The biggest difference to downloading an archive is that you are not copying the repository history, or creating a connection to the remote repository. You are only getting the source files, and none of the Git metadata stored in the .git
directory.
ソースを .zip ファイルとしてダウンロードする
ブランチのリポジトリ アーカイブをダウンロードする方法
- リポジトリのソース ビュー、コミット ビュー、またはブランチの一覧に移動します。
- ブランチ セレクタを使用してブランチを選択します。
- ブランチ セレクタの横にあるアクション ドロップダウンをクリックし、[ダウンロード] を選択します。
ブランチ一覧に表示されている任意のブランチのアクション メニューから特定のブランチのリポジトリ アーカイブをダウンロードすることもできます。
コミットからリポジトリ アーカイブをダウンロードする方法
- コミットのハッシュ番号をクリックして単一のコミットを表示します。
- 右上のパネルで [このコミットをダウンロード] をクリックします。
タグからリポジトリ アーカイブをダウンロードする方法
- リポジトリのソース ビュー、コミット ビュー、またはブランチの一覧に移動します。
- ブランチ セレクタを使用してタグを選択します。
- ブランチ セレクタの横にあるアクション ドロップダウンをクリックし、[ダウンロード] を選択します。
ソースを .tar. または tar.gz ファイルとしてダウンロードする
When you download your source file from Bitbucket's UI, you are downloading the file in .zip format. However, it is possible to edit the URL and get the archive as other formats, like .tar, .gz, or .tar.gz.
.zip 以外の形式でソース ファイルをダウンロードする方法は、次のとおりです。
- 上述の任意の手順に従い、ダウンロードしたいソースを表示します。
- ダウンロード リンクを右クリックして URL アドレスをコピーします。
URL をブラウザにペーストします。次のようになります。
.../projects/TIS/repos/website/archive?format=zip
Change
format=zip
to the format of your choice.
For .tar.gz files, change the argument toformat=
.tgz
For .tar files, change the argument toformat=
.tar
- Enter を押すと、ブラウザでファイルがダウンロードされます。