Архив метки: BITBUCKET

bitbucket

Uploading or pushing a Git or Mercurial project to an empty repository

You can upload an existing repository to a empty project in Bitbucket. When you do this, Bitbucket maintains your commit history.

Pushing a Git project

This kind of push overwrites the contents of the Bitbucket repository. You should use it with great caution.

  1. Create an empty repository in Bitbucket.
  2. Open a shell on your local machine (GitBash terminal for Windows users).
  3. Verify your SSH key is working.
    $ ssh -T git@bitbucket.org
    conq: logged in as tutorials.
    
    You can use git or hg to connect to Bitbucket. Shell access is disabled.

    The message should report you are logged in as your Bitbucket account. In this example, my ssh key was on my tutorials account. If you don’t get this message, stop and troubleshoot your SSH connection to Bitbucket. (See Use the SSH protocol with Bitbucket for information about doing this.)

  4. Navigate to the root directory of the repository you want to push.
    $ cd ~/repos/originalrepo
  5. Push the local repo up to Bitbucket
    $ git push --mirror git@bitbucket.org:tutorials/exploratory

    This command pushes your local repository to the Bitbucket server.