#Bitbucket Tutorial for UCD PlantBio Perl Club
###What is Bitbucket?
Like github, bitbucket is a web-based bosting service for git repositories (bitbucket hosts Mercurial repositories, too). As a research group at a university, a very attractive feature of bitbucket is that accounts created with an email address from an educational institution are automagically upgraded to unlimited private respositories and private collaborators. Only paid github accounts have access to privacy.
###Goal of this Tutorial
- Create an empty git repository on bitbucket
- Make a local clone of the repository and add some content
- Share the repository with collaborators
###Create an empty git repository on bitbucket
- If you don't already have a bitbucket account, create one.
- Use your
.edu
email address. You can assign an additional email address later if you wish.
- Use your
-
Goto bitbucket.
-
Click Repositories/create repository.
- Bitbucket enables the use of keyboard shortcuts. To create a repository, you can also type
grcr
(which appears to stand for "goto repository menu" and "create repository").
- Bitbucket enables the use of keyboard shortcuts. To create a repository, you can also type
-
Enter a name for the repository. For example:
perlclub_demo
(Don't use spaces!). -
Since we are making a git repo, leave
Git
checked. LeavePrivate
checked unless you want to make a public repo. -
For this tutorial, go ahead and check both
Issue tracking
andWiki
so that we can become familiar with these features. -
The next step is to select a language. As far as I know, this currently has no real function. This is the language for the entire repo, not a specific file. Just choose the most prominent programming language used in your project. For our purposes, we will choose 'Perl'.
-
You can enter a description and website for the project now or later.
-
Click
Create Repository
.
###Make a local clone of the repository and add some content
- Open
Terminal.app
- Change to the directory that contains your git repos.
- If you don't have any git repos, I suggest making a new directory in yur home directory:
mkdir ~/git.repos
. Then go into this directory (cd ~/git.repos
).
- If you don't have any git repos, I suggest making a new directory in yur home directory:
- On the overview page of your new git repo on bitbucket, you should see an area that says "Clone this repository" that has a snippet of code that looks similar to
git clone [email protected]:mfcovington/perlclub_demo.git
. - To clone the empty bitbucket repo onto your computer, paste this snippet into your Terminal window. You will need to enter your bitbucket credentials.
- In this case, a new directory containing the repository and accompanying files will be created in
~/git.repos/perlclub_demo
. - (add content, commit, push to remote bitbucket repository)
###Share the repository with collaborators