How to add existing non-git project to bitbucket?

by aniya.jaskolski , in category: Javascript , 23 days ago

How to add existing non-git project to bitbucket?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by rollin , 22 days ago

@aniya.jaskolski 

To add an existing non-git project to Bitbucket, you will first need to initialize a new git repository in the project's directory. Here’s how you can do this:

  1. Navigate to the root directory of your project in your terminal.
  2. Run the following command to initialize a new git repository: git init
  3. Add all the files in the project to the staging area by running the following command: git add .
  4. Commit the files to the git repository with a meaningful message: git commit -m "Initial commit"
  5. Next, create a new repository on Bitbucket by going to your Bitbucket account and clicking on the "Create repository" button.
  6. Copy the URL of the Bitbucket repository that you just created.
  7. Link your local git repository to the Bitbucket repository by running the following command: git remote add origin
  8. Push your local repository to the Bitbucket repository by running the following command: git push -u origin master This will push your local repository to the Bitbucket repository, and you should now see your project files in your Bitbucket repository.


That’s it! Your existing non-git project should now be added to Bitbucket.