How to Add a Git Repository in Bitbucket Importing your git repository into bitbucket is all easy process which give you freedom and flexibility that how you should manage it with your Coding standards. For More of these considerations and best practices, here a detailed guide on how to import a repository from GitHub to Bitbucket!
How to Import GitHub Repository into Bitbucket
New Repository in Bitbucket
Go to Bitbucket and log in.
Select Import Repository from the Repositories menu in the top toolbar bar.
Select Git as the repository type
Provide the Repository URL:
The HTTPS URL of the GitHub repository you want to import. >
This can usually be out of the front page of github repository.
Copy this URL and go to the input field of the Bitbucket account. If the repo is private, check Require Authentication, and if needed provide your Github credentials or a personal access token.
Repository settings to configure:
The New Repository fields would then automatically be filled out, including the name of your imported repository.
You should be able to change the name of repository if you want and switch it between public or private depending on what is most suitable for your case.
Initiate the Import:
Finally, press the Import Repository button and you are done. A progress bar will appear to show the status of your import.
Post-Import Actions:
Once the import is done, you can clone the repo locally or start working inside Bitbucket itself.
Factors to Bear in Mind for Import Success
Auth: Confirm GitHub and Bitbucket have the correct permissions If you have two factor authentication enabled then use app password to continue without interruptions.
Size: Large repositories may take a moment to import so keep an eye on your Bitbucket notifications.
Review your repository in Bitbucket and make sure that all branches, commits have been properly imported along with any files.
Best Practices
Back up vital data: It is a good idea to back the critical key points of your original repository before starting an import.
Reviewing Docs: Get to know what parts of its docs and your preferred options or settings could change how you work after importing.Git Repository (ad)
Keeping these steps and consideration in mind you can easily move your projects from GitHub to Bitbucket without losing the control of code repositories.