In this post, we want to discuss how to import project in Bitbucket using the terminal or bash. Before we get started, if you want to know about open multiple tabs on one click, please go through the following article: Open multiple tabs on button click in C#.


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.

Import code for a new project to 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: git remote add origin https://[email protected]/techaid24/myfirstproject.git (Here: techaid24 is my bitbucket user name and myfirstproject is my repository name.)
  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 to Bitbucket Server

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

If you face any problem to push your updated code, then you should push with force.
import project in bitbucket using the terminal or bash

Leave a Comment