How to import an existing, unversioned code project into Bitbucket Server?


I want to push my existing project code to Bitbucket server from local.

Asked on October 10, 2018 in Programmer.
Add Comment
2 Answer(s)
Best answer

Using your git client, you need to navigate to your project folder and run below commands,

git init
git add --all
git commit -m "Initial Commit"

Now Log into Bitbucket Server and create a new repository.
Say your repository url is

So run below commands,

git remote add abc
git push -u abc master
Enter your bitbucket password with which you have created a repository.
Your are done !!
1) replace xyz with your bitbucket username
2) replace abc with any one word of your choice

Answered on October 10, 2018.
Add Comment

Get your local Git repository on Bitbucket

Step 1: Switch to your repository’s directory

cd /path/to/your/repo

Step 2: Connect your existing repository to Bitbucket

git remote add origin


git push -u origin master
Answered on October 28, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.