CATEGORY: Bitbucket

Add a project to a new repository on Bitbucket

If you have code on your local machine that is not under source control, you can prepare it by putting your code into a Git repository locally.

  1. From your terminal, change to the root directory of your existing code.
  2. Initialize the directory under source control from the following command:
  3. Add the existing files to the repository you have initialized:
  4. Commit the files:

    On macOS, you can use single quotes or double quotes around the comment message. On Windows, you must use double quotes.

  5. Connect your new local Git repository to the remote repository on Bitbucket. To do so, enter git remote add origin with the remote URL:

    You can find the URL next to the git clone command for the repository:

  6. Push all the code in your local repo to Bitbucket with the following command:


There are no more results.