Skip to content

Latest commit

 

History

History
107 lines (70 loc) · 4.32 KB

README.mdown

File metadata and controls

107 lines (70 loc) · 4.32 KB

Run some sand through your hands

Welcome to your personal sandbox, you can’t really break anything so feel free to go a bit crazy. We’ve created a couple basic tasks to get you started. Try them both, or just play in your sandbox to get acquainted with Bitbucket.

You can complete the following tasks with either SourceTree (Atlassian’s Git and Mercurial client) or using the command line from Linux or OSX. Or use the BASH command line tools for Windows.


A word to the wise

While it's true you cannot really break anything in the bucket-o-sand you should keep the following in mind:

  • We designed this as a practice repo to help you get acquainted with Bitbucket.
  • At this point we've not designed this tutorial to include pull requests to the source repository, we usually close them with a note thanking you for your time.
  • This repository is usually a fork of a source repository. For this reason, when you are ready to start coding you will likely want to create an entirely new repo to use for your project.

Happy coding!


Using SourceTree

###TASK 1. Clone the repository to your local machine

Cloning copies the repository to your local system.

  1. Click the Clone in SourceTree icon, a down arrow, near the top of the page, then click Clone in SourceTree.

    • A Launch application window opens.
  2. Select SourceTree, if it is not already selected, and click OK.

    • SourceTree may ask for your password several times.
  3. Review the information in the Clone new tab. Notice the Destination Path is where you will clone your repository.

  4. Click Clone

    SourceTree clones your repository from Bitbucket to your local machine and will open to the new repository.

TASK 2. Make a change

Learn the Git basics of stage, commit, push when you make a change to the 'sample.html' file.

  1. Double-click on your tutorial repo.

  2. Select Working Copy from the left hand navigation.

  3. Select Show All from the list above

    SourceTree shows the files in the working tree.

  4. Select the sample.html file and do one of the following: *For Mac press 'control + click' and select Show In Finder *For Windows right click and select Show in Explorer

  5. Using your favorite editor, edit the sample.html file.

  6. Change the heading from My First File to Playing in the Sand.

  7. Save and close the file.

  8. Return to SourceTree.

    SourceTree changes the file's icon to modified.

  9. Select the 'sample.html' file and drag it into Staged Files area.

  10. Click Commit.

  11. Enter a commit message.

  12. Press Commit.

  13. Click Push to send your changes to Bitbucket.

  14. Click Commits, in Bitbucket, to view your change.


Using the command line from Linux, OSX or GitBash for Windows.

Task 1. Clone your repository:

Cloning makes a local copy of the repository for you.

  1. Click the Clone button in Bitbucket.

  2. Make sure the protocol is set to HTTPS.

    Bitbucket pre-fills the clone command for you.

  3. Copy the command.

  4. Open a terminal, or launch a GitBash terminal, on your local machine.

  5. Navigate to the directory where you want your files.

  6. Paste the command at the prompt.

  7. Press ENTER on your keyboard.

    Git clones your repository from Bitbucket to your local machine.

If you have trouble cloning from these instructions you can check out the more detailed tutorial.

If you are using a terminal's (Linux/OSX/GitBash) command line:

Learn the Git basics of stage, commit, push when you make a change to the 'sample.html' file.

  1. Go to your terminal window and navigate to the repository root.

  2. Using your favorite editor, edit the sample.html file.

  3. Change the heading from My First File to Playing in the Sand.

  4. Save and close the file.

  5. Stage the file with Git.

    git add sample.html

  6. Commit the change.

    git commit -m "changing sample.html"

  7. Push to Bitbucket.

    git push

    The system prompts you for a username/password.

  8. Enter your Bitbucket account name and the password.

  9. After the push completes, click Commits, in Bitbucket, to view your change.