Get started with Git



アトラシアン コミュニティをご利用ください。


Atlassian Bitbucket Data Center and Server is the Git repository management solution for enterprise teams. It allows everyone in your organization to easily collaborate on your Git repositories.

This page will guide you through the basics of Bitbucket. By the end you should know how to:


このガイドでは、ユーザーが過去に Git を体験したことがないと仮定しています。ただし、以下を想定しています。

  • ローカルコンピューターに Git バージョン 1.7.6 以上がインストールされている。
  • You are using a supported browser.
  • You have Bitbucket installed and running. If you haven't, see Getting started.

Please read Git resources or check out our Git tutorials for tips on getting started with Git.

Add users to Bitbucket and grant permissions

The first thing you can do is add collaborators.

To add users

  1. Go to the Bitbucket administration area by clicking the cog , then click Users in the Admin screen (under Accounts):
  2. Click Create user to go directly to the user creation form.
  3. Once you've created a user, click Change permissions to set up their access permissions.

ユーザー認証には 4 のレベルがあります。

  • System Administrator — can access all the configuration settings of the instance.
  • Administrator — same as System Admins, but they can't modify file paths or the instance settings.
  • プロジェクト作成者 — プロジェクトを作成、編集、削除できる。
  • Bitbucket User — active users who can access Bitbucket.

See Users and groups for more information about authentication.

See External user directories if you have existing user identities you wish to use with Bitbucket.


Create your project

The next thing you do, is create a project. You'll add repositories to this project later.

Go to 'Projects' and click Create project. Complete the form and submit it to create your new project. See Creating projects for more information.

Open project access to others




プロジェクトのアクセス権には 3 のレベルがあります。

  • Admin — can create, edit and delete repositories and projects, and configure permissions for projects.
  • 書き込み— プロジェクトのすべてのリポジトリからプッシュやプルができます。
  • 読み取り — プロジェクトのリポジトリのコードヤコメントを参照したり、プルすることのみできます。

See Using project permissions for more information.

Create a repository and get your code into Bitbucket



Once a repository is created, the project permissions are applied to the repository. That means all repositories created in a project share the same access and permission settings. If you already have a Git project you'd like to use, see Importing code from an existing project.


Once submitted you will be taken directly to your repository homepage. As there is no content in your repository yet, you'll see some instructions to help you push code to your repository. See Creating repositories for more information.

Clone and push

This section describes how to clone the repository you just created and then push a commit back to it. You can see the clone URL to use at the top right of the screen. SSH access may be available.

In a terminal, run the following command (replace <bitbucketURL> with the URL for your instance of Bitbucket):

git clone <bitbucketURL>/git/<projectname>/<reponame>.git

Use your Bitbucket username and password.



You should now have a new empty directory tracked by Git, in the user space of your local machine. Let's add some content and push it back to Bitbucket.

<reponame>ディレクトリで、helloworld.txt という名前のテキストファイルを作成し、その中に「Hello World」と書き込みます。


cd <reponame>
git add .
git commit -m "My first commit"
git push origin master

If everything went fine, when you refresh the Bitbucketscreen, you will see that the homepage of your repository has been replaced with a file browser showing you a link to helloworld.txt.


For more information about getting your code into Bitbucket, see Importing code from an existing project

Check out our Git tutorials and training for more information, and have a look at this list of basic Git commands that you will probably use often.

最終更新日 2022 年 11 月 1 日


Powered by Confluence and Scroll Viewport.