Push updates to a repository

Once you make changes to your files and commit to your local repository, you'll need to push them to the remote Bitbucket Cloudrepository so that other people can see them too.

To push to a repository, you need write access for that repository. If you can't push and think you should have that access, ask your repository administrator to grant you access.

To push to a Git repository

  1. At the command line, make sure you've changed into the repository directory.

  2. Enter git push at the command line to push your commits from your local repository to Bitbucket. To be specific about exactly where you're pushing, enter git push <remote_server> <branch_name>. This command specifies you're pushing to:

    • remote_server — the name of the remote server. In most cases, origin indicates that you're pushing to Bitbucket.

    • branch_name — the repository branch where you made your changes and want to push them. A branch allows you do work on a set of code for your repository separate from the main codebase.

  3. If prompted for authentication, enter your Bitbucket username and password.
    In this example, origin is the remote server and master is the branch where you're pushing:

    $ git push origin master
    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 Commits tab shows your most recent commits.

To push to a Mercurial repository

  1. At the command line, make sure you've changed into the repository directory.

  2. Enter hg push at the command line to push your commits from your local repository to Bitbucket.

  3. If prompted for authentication, enter your Bitbucket username and password.
    For an example:

    $ hg push
    pushing to https://bitbucket.org/sarahmaddox/sarahmaddox
    searching for changes
    http authorization required
    realm: bitbucket.org HTTP
    user: emmap1
    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)

Last modified on Jul 10, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.