Bitbucket is a distributed version control system (DVCS
) code hosting site that supports Mercurial
and Git. With Mercurial and Git, your data is distributed by definition but you still need a place to share it and keep track of your development. That is where Bitbucket comes in.
You may need to check why I choose bitbucket over github.
Bitbucket provides a fully-featured environment for managing your development project, including a code repository, a wiki (naturally backed by Mercurial and Git – you can clone it), a powerful issue tracker and easy collaboration with others.
Simply put, Bitbucket takes the pain out of sharing code and lets you focus on what you do best: Code. Bitbucket offers both commercial plans and free accounts. It offers free accounts with an unlimited number of private repositories (which can have up to five users in the case of free accounts).
Here are quick steps to setup BitBucket Repository to you Eclipse Environment.
Step-1
Register for Bitbucket.
Step-2
Create Private
/Public repository. It’s free compare to Github 🙂 .
Step-3
On Overview page https://bitbucket.org/dashboard/overview
, look for your repository information.
Mouse hover will give you Repository URL
which we will use later to import project into Eclipse.
Step-4
Now let’s make Eclipse ready for Git.
- Open Eclipse
- Click on
Help
menu - Click
Install New Software
Step-5
Install eGit into Eclipse. Git version control with Eclipse (EGit) – Tutorial. How to use bitBucket with EGit in Eclipse.
URL: http://download.eclipse.org/egit/updates
Step-6
Select Eclipse Git Team Provider
and JGit
form option and click next
and finish
install.
Step-7
Now Open Perspective
and choose Git
from list.
Step-8
Click Clone Repository Button.
Step-9
Enter your Bitbucket URL and User Information as mentioned in below diagram. Click Next
and Finish
. No need to change other configuration in next window.
Step-10
You should see your Bitbucket repository now in eclipse.
Step-11
Now you may want to import the project so you can work on the source code.
- Click
- ‘Windows’ >
- ‘Open Perspective’ >
- ‘Resource’
- Click
- ‘File’ >
- ‘Import’ >
- ‘Git’ >
- ‘Projects from Git’ >
- ‘Existing local repository’ >
- ‘Select a Git Repository’ >
- ‘Import as General Project’ >
- ‘Next’ >
- ‘Finish’
- The code should then appear in your ‘Project Explorer’ window as a normal project
- Now make changes to your file as you want
- Look at ‘Git Staging’ view to see your changed files and Click ‘
Commit and Push
‘
Do let me know if you encounter any issue while setting this up. Now what? Now setup SmartGit with your BitBucket repository to do all kind of commit, put, etc GIT operations.