BitBucket is a web-based hosting service for projects that use use either the Mercurial or Git revision control systems. It is similar to Github. BitBucket is an Atlassian product which integrates very well with JIRA, a popular project and issue-managing app. You can get a free account from https://bitbucket.org.
We need to download and install Git from https://git-scm.com/downloads before we start to configure BitBucket. Git installation will provide GitBash command line utility.
Please follow the steps below to store a Salesforce project in BitBucket. We will use the BitBucket account for ApexCoder https://bitbucket.org/apexcoder .
- Sign in to BitBucket and create repository
- Repository > Create repository > Repository name (e.g. Salesforce)
- Clone our repository (https://bitbucket.org/apexcoder/Salesforce) in our local machine
- Create a folder Workspace in your computer root folder.
- Open Git Bash command prompt from All Programs > Git Bash.
- Navigate to the C:\Workspaces from Git Bash.
- Clone using the following command. Enter your BitBucket Username and Password: git clone https://bitbucket.org/apexcoder/Salesforce
- Verify if Salesforce folder is created in C:\Workspace
- Install egit plugin in Eclipse from http://download.eclipse.org/egit/updates/.
- Commit project to BitBucket Salesforce repository
- In Eclipse right click on project, Click Team > Share Project.
- Select Git from the Share Project screen and click next.
- Click create in Configure Git Repository screen
- Select Salesforce path as shown below and click finish
- Click finish to connect local Salesforce project folder with BitBucket Salesforce repository.
- Right click on the Eclipse project > Team >Add to Index. This step will add all the files to be committed.
- Right click on the project and click Commit. Enter commit message. Click on Commit and Push.
- Click Next and enter your BitBucket Username and Password
- Click finish on Push Confirmation screen
- Verify if your Salesforce project is committed to BitBucket
- If you make change to your Salesforce project, you can repeat the steps to store the latest revision of your project in BitBucket. If new files are created make sure you perform Add to Index Step.
- We can see the commits we make from BitBucket.
- In case you need to revert your changes after last commit, use Team > Reset
Senior Salesforce Architect
Connect me on LinkedIn
Follow me on Twitter @apexcoder
Subscribe to my blog https://apexcoder.com
Email me email@example.com