Push code to Bitbucket

To get your code changes into Bitbucket, you work on them locally before you add, commit, and push them to Bitbucket.

Push changes to a Git repository

  1. Create your new files or edit existing files in your local project directory.
  2. From the command line, enter cd <path_to_local_repo> so that you can enter commands for your repository.
  3. Enter git add --all at the command line to add the files or changes to the repository.

  4. Enter git commit -m '<commit_message>' at the command line to commit new files/changes to the local repository. For the <commit_message> , you can enter anything that describes the changes you are committing.
  5. Enter git push  at the command line to copy your files from your local repository to Bitbucket.
  6. If prompted for authentication, enter your Bitbucket password.

Push changes to a Mercurial repository

  1. Create your new files or edit existing files in your local project directory.
  2. From the command line, enter cd <path_to_local_repo> so that you can enter commands for your repository.
  3. If you created a new file as part of your changes, enter hg add at the command line to add the file to the repository. If you didn't create any new files, continue to the next step.

  4. Enter hg commit -m '<commit_message>' at the command line to commit new files/changes to the local repository. For the <commit_message>, you can enter anything that describes the changes you are committing.
  5. Enter hg push at the command line to copy your files from your local repository to Bitbucket.
  6. If prompted for authentication, enter your Bitbucket password.

Last modified on Feb 22, 2017

Was this helpful?

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