Import an existing, unversioned code project into Bitbucket Server

Import code from an existing project using the terminal by first cloning the repository to your local system and then pushing to an empty Bitbucket Server repository. If you have code on your local machine that is not under source control, you can put it under source control and import it into Bitbucket Server.

Assuming you have Git installed on your local machine, then:

  1. Locally, change to the root directory of your existing source.
  2. Initialize the project by running the following commands in the terminal:
  3. Log into Bitbucket Server and create a new repository.
  4. Locate the clone URL in the nav panel on the left (for example: https://[email protected]:7999 /yourproject/repo.git).
  5. Push your files to the repository by running the following commands in the terminal (change the URL accordingly):
  6. Done! Your repository is now available in Bitbucket Server.


Adding code to an existing project into Bitbucket Server

After first cloning the repository, you need to update project any time. Use the bellow code to push your updated code

If you face any problem to puch your updated code, then you should push with force.


Leave a Reply