Install SourceTree and Configure Credentials
In order to start working with your Bitbucket repositories, you must first install and configure sourceTree.
- Download and install SourceTree.
- Post installation, launch SourceTree.
- From the Tools menu, select Options.
- In Authentication, click Add.
- Set Hosting Service as Bitbucket.
- Set Prefered Protocol as HTTPS.
- Authentication as Basic.
- In Username, enter your Bitbucket account username.
- Click Refresh Password to authenticate username.
An Authentication window appears. - Enter your Bitbucket password.
- Select the Remember Password option and then click Login.
SourceTree is now configured for working with the Bitbucket repositories.
Creating and Cloning Repository
After you configure SourceTree, you can now create a repository and clone it on the local system.
This activity needs to be performed by Qualitia Administrator who is responsible for creating projects.
To create and clone repository:
- Launch SourceTree.
- Click Create.
- In the Destination Path, select a folder path where you would like to save and work on your local repository.
- Enter the prefered repository name.
- Select GIT.
Qualitia supports GIT repositories only. Support for Mercurial is not yet added. - Select the Create Repository on Account option.
In Repository Settings, Bitbucket account details appear that are added while configuring SourceTree. - Add Description, if required.
- Select Is Private option to mark this repository as a private repository.
Keeping repositories private enables you to control who can access and update data from your repository. This is important to avoid discrepancy in the project data. - After the repository is created and cloned, add a sample text file into the repository and commit it.
- To commit sample file,
- Navigate into the folder where you have cloned the repository on the local system.
- Create a new sample.txt file with sample text in it.
- From SourceTree, stage the file and add comment, if required.
- Select Push changes immediately option and click Commit.
This is a one-time activity for each repository you create on Bitbucket. Commiting sample file is mandatory for creating new branches into the repository to add Qualitia project data.
Adding Existing Qualitia Projects to Bitbucket Repository
After you clone the repository, you can now add your existing Qualitia projects to the Bitbucket repository.
This is a one-time activity for each of the existing Qualitia project. Once the project is added to the repository, all the changes made to the repository are automatically updated by Qualitia.
To add existing projects to Bitbucket repository:
- Navigate into the folder where you have cloned the repository.
- Move your existing project folder (<ProjectName>_projectdb) to this location.
You can get this folder at the location specified in Qualitia Configuration Setting > Dependency > Project Path. - Launch SourceTree.
- Create a new branch with your Qualitia Project name.
To create a new branch:- Click Branch > New Branch.
- Enter New Branch name.
- Ensure that Checkout New Branch option is selected.
- Click Create Branch.
- After creating a branch, right-click the branch and select Push > Origin.
- Stage all files and add comments, if required.
- Select Push changes immediately option and click Commit.
- Now copy the directory path of the repository (from local system) and set it as Qualitia Project Path (in Configuration Setting > Dependency).
- Also, in Configuration Setting > General, select Version Control as GIT and add Bitbucket username and password.
- Restart Qualitia to start working on the projects that are integrated with Bitbucket repository.