Push updates to a repo

Once you have changed your code and other files in your local repository, you will need to push them to the remote Bitbucket Cloud repository so that other people can see them too.

Shallow clones unsupported

Bitbucket does not support shallow clones. A shallow clone is created by restricting the clone's history to a revision subset. You cannot push a shallow clone to Bitbucket.

You need write permission for the repository to be able to push to the repository. See Repository privacy, permissions, and more.

Mercurial push example

  1. Enter hg push at the command line prompt in your local project directory, to copy your files from your local repository to Bitbucket.

    $ hg push
  2. When prompted for authentication, enter your Bitbucket username and password.
    Example:

    $ hg push
    pushing to https://bitbucket.org/sarahmaddox/sarahmaddox
    searching for changes
    http authorization required
    realm: bitbucket.org HTTP
    user: sarahmaddox
    password:
    remote: adding changesets
    remote: adding manifests
    remote: adding file changes
    remote: added 2 changesets with 16 changes to 11 files
    remote: bb/acl: sarahmaddox is allowed. accepted payload.
    remote: quota: 108.9 KB in use, 1.0 GB available (0.01% used)

Git push example

  1. Enter git push at the command line prompt in your local project directory, to copy your files from your local repository to Bitbucket.

    $ git push
  2. When prompted for authentication, enter your Bitbucket username and password.
    Example:

    $ git push
    Password:
    Counting objects: 6, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (4/4), 23.98 KiB, done.
    Total 4 (delta 0), reused 0 (delta 0)
    remote: bb/acl: alui is allowed. accepted payload.
    To https://alui@staging.bitbucket.org/alui/alui-git-fork.git
       0ad86b3..395d3c2  master -> master

Open your Bitbucket repository in your browser. The Overview tab shows your most recent commits in the activity stream on the right:

RELATED TOPICS

Cloning a Bitbucket Repository
Work on local source files

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport