0% found this document useful (0 votes)
3 views3 pages

Bitbucket Guide

This document provides guidelines for using Bitbucket, including installation instructions for Git and Mercurial on various operating systems. It outlines the steps to create an account, set up a Git repository, and push changes to Bitbucket, including creating and committing a README file. The instructions are detailed and include command-line examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Bitbucket Guide

This document provides guidelines for using Bitbucket, including installation instructions for Git and Mercurial on various operating systems. It outlines the steps to create an account, set up a Git repository, and push changes to Bitbucket, including creating and committing a README file. The instructions are detailed and include command-line examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Guidelines to Use Bitbucket

Chetak Kandaswamy

1. Install Git and Mercurial

Mac users seethis page. Linux users see this page

1.1. Install Git for Windows

Do the following to install Git on your Windows machine:

Step 1: Click on Download the Git for Windows installer package.


You can either Run the installer directly from your browser's File Download dialog or you can
Save the le to a folder on your computer. These instructions assume you run the installer when
prompted by the downloader.

The version shown on your screen may be dierent than the one shown here of course. That is
ok as long as you are installing a Git version 1.6.6 or later. Complete the setup.

Step 2. Git tutorial and Graphical user interface for Git


If you are new to Git it is good to understand basics. Git Tutorial

To have Windows explorer like Graphical user interface for Git click on the link and install the
software.

And if you are interested in command line then.


Open the Git Bash window by choosing Start > All Programs > Git > Git Bash. The system
opens a command window:

1
Congure your username using the following command: git cong global [Link] "FIRST_NAME
LAST_NAME"
Congure your email address using the following command: git cong global [Link] "MY_NAME@[Link]"

1.2. Install Mercurial

TortoiseHg 2.2.1 is the Microsoft Windows version of Mercurial.


Download the all-in-one installer (MSI version) from the Bitbucket repository and the installa-
tion steps are available in section 1.2 of this page.

2. Create an Account and a Git Repo

Step 1: To use the standard Bitbucket sign up, open your browser and do the following:
1. Open [Link] in your browser.
2. Complete the elds on the form.
3. Press Sign up.

Step 2: Create a Git repository (repo)


Follow step 2, step 3 and step 4 in this link

Step 3: Clone Your Git Repo


1. Create a directory to contain your repositories. Call it repos.
2. Go to bitbucket account and click Overview > Clone button
3. Go to Git Bash window and paste it.
4. Enter your password.

Git creates the repository but warns you that you have cloned an empty repository. At this point,
your terminal window should look something like this:

$ cd ~/repos
$ git clone [Link]
Cloning into 'bb101repo'...
Password
warning: You appear to have cloned an empty repository.
Step 4: Create a README, add it locally, and push it to the Bitbucket Server
1. Using your favorite editor, create a README le with the following content:

Welcome to My First Repo


-
This repo is a practice repo I am using to learn Bitbucket.
2. Save the README le inside your new clonned repository.

2
3. Go ahead and get the status of your local repository.

$ git status
# On branch master
#
# Initial commit
#
# Untracked les:
# (use "git add <le>..." to include in what will be committed)
#
# README
nothing added to commit but untracked les present (use "git add" to track)

4. Tell git to track your new README le using the git add command.

git add README

5. Commit all the changes you added.

$ git commit -m "adding repo instructions"


[master (root-commit) 12ad229] adding repo instructions
1 les changed, 3 insertions(+), 0 deletions(-)
create mode 100644 README
6. Go back to your local terminal window and push your committed changes using the git push
command. You should see something similar to the following:

$ git push -u origin master


Password:
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 303 bytes, done. Total 3 (delta 0),reused 0 (delta 0)
remote: bb/acl: newuserme is allowed. accepted payload.
To [Link]
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
7. Go to your Bitbucket bb101repo repository in your browser and click the Commits item on
the menu bar. You should see a single commit on your repository.

8. Select the Source option. You should see that you have a single source le in your repository,
the README le you just added.

9. Navigate the Overview page of your repository. You should see the contents of your README
displayed.

You might also like