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
- Create your new files or edit existing files in your local project directory.
- From the command line, enter
cd <path_to_local_repo>
so that you can enter commands for your repository. Enter
git add --all
at the command line to add the files or changes to the repository.- 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. - Enter
git push
at the command line to copy your files from your local repository to Bitbucket. - If prompted for authentication, enter your Bitbucket password.
Push changes to a Mercurial repository
- Create your new files or edit existing files in your local project directory.
- From the command line, enter
cd <path_to_local_repo>
so that you can enter commands for your repository. 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.- 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. - Enter
hg push
at the command line to copy your files from your local repository to Bitbucket. - If prompted for authentication, enter your Bitbucket password.