Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

新しいリポジトリを作成すると、既存のプロジェクトから Stash をインポートできます。これを行うには、最初にリポジトリをローカルのコンピューターへ複製してから、空の Stash リポジトリへプッシュします。

このページの内容

Import an existing, unversioned code project to an empty repository

If you have code on your local machine that is not under source control, you can put it under source control and import it into Stash. To do this:

  1. Locally, change to the root directory of your existing source.
  2. Initialise the project by running the following commands in the terminal:

    git init
    git add --all
    git commit -m "Initial Commit"
  3. Log into Stash and create a new repository.
  4. Locate the clone URL at the top right (eg.: https://username@stash.atlassian.com/scm/PROJECT/repo.git).
  5. Push your files to the repository by running the following commands in the terminal (change the URL accordingly):

    git remote add origin https://username@stash.atlassian.com/scm/PROJECT/repo.git 
    git push -u origin master
  6. 完了です!Stash でリポジトリを利用できるようになりました。

Import a Git project to an empty repository

You can import an existing repository into an empty project in Stash. When you do this, Stash maintains your commit history.

  1. Check out the repository from your existing Git host. Use the --mirror parameter to include all branches and tags:

    git clone --mirror
  2. Change the remote origin in your local repository to point to Stash (change the URL accordingly):

    git remote set-url origin https://username@stash.atlassian.com/scm/PROJECT/repo.git
  3. Then push all branches to Stash:

    git push origin

Mirror an existing Git repository

既存のリポジトリを Stash でホストされるリポジトリへミラーリングできます。

  1. Check out the repository from your existing Git host. Use the --mirror parameter to include all branches and tags:

    git clone --mirror
  2. Stash をローカルリポジトリの別のリモートとして追加:

    git remote add stash https://username@stash.atlassian.com/scm/PROJECT/repo.git
  3. Then push all branches and tags to Stash

    git push --all stash
    git push --tags stash
  4. Using git fetch origin and the git push command listed in step 3 the repository in Stash can be updated with changes from the upstream repository.
  • ラベルなし