[Other doc versions]
[Doc downloads]
Atlassian Stash is the Git repository management solution for enterprise teams. It allows everyone in your organisation to easily collaborate on your Git repositories.
このページは、Stash の基本を通じてガイドします。最後には、次の方法がわかるようになります:
このページの内容
このガイドでは、ユーザーが過去に Git を体験したことがないと仮定しています。ただし、以下を想定しています。
Please read Git resources or check out our Git tutorials for tips on getting started with Git.
Stash でまず最初にできることは、協力者の追加です。
Go to the Users listing in the Administration area.
Click Create User to go directly to the user creation form.
Once you've created a user, click Change permissions to set up their access permissions.
There are 4 levels of user permissions:
既存のユーザー ID を Stash と一緒に使用したい場合は、「外部ユーザーディレクトリ」を参照してください。
Stash で次にできることは、プロジェクトの作成です。このプロジェクトに後からリポジトリを追加します。
Simply click Create Project in the Projects page.
Complete the form and submit it to create your new project.
プロジェクト管理者は、プロジェクトの権限を他の協力者へ与えることができます。
Click the Permissions tab for the project.
On that page you can add users and groups to a project you've already created.
プロジェクトのアクセス権には 3 のレベルがあります。
プロジェクト管理者は、プロジェクト内でリポジトリを作成できます。
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.
Click Create Repository to open the repository creation form.
送信されたら、リポジトリホームページへ直接移動します。リポジトリ内にはまだコンテンツがないため、リポジトリへコードをプッシュするのに役立つ指示が表示されます。
Here you will simply 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 <stashURL>
with the URL for your instance of Stash):
git clone <stashURL>/git/<projectname>/<reponame>.git
あなたの Stash ユーザー名とパスワードを使用します。
ターミナルでの結果は、以下のスクリーンショットのようになるはずです。
この時点で、ローカルコンピューターのユーザースペース内に、Git によって追跡された新しい空のディレクトリが作成されているようです。コンテンツを追加し、Stash にプッシュし返しましょう。
<reponame>ディレクトリで、helloworld.txt という名前のテキストファイルを作成し、その中に「Hello World」と書き込みます。
次に、ターミナルで次のコマンドを実行します
cd <reponame> git add . git commit -m "My first commit" git push origin master
すべてが成功すると、Stash 画面を更新したときに、リポジトリのホームページが、helloworld.txt へのリンクを示すファイルブラウザに置き換えられていることがわかります。
これで、協力者とコーディングできるようになりました。
For more information about getting your code into Stash, 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.