Cmsc433 solving project 0 getting started with bitbucket git and eclipse
Download
1 / 36

CMSC433 Solving Project 0 Getting started with BitBucket , Git and Eclipse - PowerPoint PPT Presentation


  • 59 Views
  • Uploaded on

CMSC433 Solving Project 0 Getting started with BitBucket , Git and Eclipse. bitbucket. Creating an account https://bitbucket.org/. bitbucket. Creating an account https://bitbucket.org/ Sign up now, free. bitbucket. Creating an account https://bitbucket.org/ Sign up now, free

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CMSC433 Solving Project 0 Getting started with BitBucket , Git and Eclipse' - stash


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Cmsc433 solving project 0 getting started with bitbucket git and eclipse

CMSC433 Solving Project 0Getting started with BitBucket, Git and Eclipse


Bitbucket
bitbucket

  • Creating an account

    • https://bitbucket.org/

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Bitbucket1
bitbucket

  • Creating an account

    • https://bitbucket.org/

    • Sign up now, free

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Bitbucket2
bitbucket

  • Creating an account

    • https://bitbucket.org/

    • Sign up now, free

    • Validate email address

      • If you use your .eduaddress, you get the Unlimited Community License for Free!

    • Done?

      • Not yet: don’t forget to update your first and last name in the account preferences!

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 0
Let’s get Project 0!

  • Open the class BitBucket address:

    • https://bitbucket.org/cmsc433_spring2012/project0

  • Fork Project 0

    • Don’t forget to concatenate your Directory ID to your forked repository!

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 01
Let’s get Project 0!

  • Now you’re… almost ready to get the project skeleton code on your machine!

    • Before you can do it, you have to get a Git client first…

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git

  • Download a Git client. Tutorials for all:

    • Windows 7: http://confluence.atlassian.com/display/BITBUCKET/Set+up+Git+and+Mercurial

    • Mac OSX: http://confluence.atlassian.com/pages/viewpage.action?pageId=269981802

    • Linux (Ubuntu): http://confluence.atlassian.com/pages/viewpage.action?pageId=269982882

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users
Git (Windows users)

  • You will need msysgit (1.7.8)

    • http://code.google.com/p/msysgit/downloads/list

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users1
Git (Windows users)

  • You will need msysgit (1.7.8)

    • http://code.google.com/p/msysgit/downloads/list

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users2
Git (Windows users)

  • Some tricks

    • Set the Git home directory (by default, it’s C:\Users\<username>):

      • Create a directory with this purpose (for example, D:\CMSC433\Git)

      • Create a HOME environment variable

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users3
Git (Windows users)

  • Some tricks

    • Set up your name and email (so they appear nicely in BitBucket when you make changes to your repository)

      • In Git Bash, type the commands:

        • gitconfig --global user.name “<first name> <last name>“

        • gitconfig --global user.email“<your_email>@umd.edu“

        • (notice that Git creates a file called .gitconfig with the information you provided)

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 02
Let’s get Project 0!

  • Now you’re… almost ready to get the project skeleton code on your machine!

    • In the repository page, look for the HTTPS link…

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 03
Let’s get Project 0!

  • Now you’re… almost ready to get the project skeleton code on your machine!

    • In the repository page, look for the HTTPS link…

    • Copy it, and paste it in the Git command window. Git will create a clone of the repository on your local machine…

      • … but how annoying: you need to supply the password for your account. Can we get rid of that?

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users4
Git (Windows users)

  • Let’s create a default ssh identity.

    • Run the command: ssh-keygen

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users5
Git (Windows users)

  • Let’s create a default ssh identity.

    • Create a config file (indentation is important) (~/.ssh/config):

    • Restart your Git bash terminal

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users6
Git (Windows users)

  • Let’s create a default ssh identity.

    • Let BitBucket know about your ssh identity:

      • In your Account Settings page, look for the SSH keys section

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Git windows users7
Git (Windows users)

  • Let’s create a default ssh identity.

    • Let BitBucket know about your ssh identity:

      • In your Account Settings page, look for the SSH keys section

      • Open the public key generated by ssh-keygen. (For example, D:\CMSC433\Git\.ssh\id_rsa.pub)

      • Paste the contents into the text box, and click Add Key

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 04
Let’s get Project 0!

  • Now you’re… almost ready to get the project skeleton code on your machine!

    • In the repository page, look for the HTTPSSSH link…

    • Copy it, and paste it in the Git command window. Git will create a clone of the repository on your local machine!

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 05
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • File > Import > General > Existing Projects into Workspace

      • Or… use magic: CTRL+3

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 06
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • File > Import > General > Existing Projects into Workspace

    • Select root directory:

      • (point to the path where you clonedthe project)

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 07
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • File > Import > General > Existing Projects into Workspace

    • Select root directory:

      • (point to the path where you clonedthe project)

    • Finish!

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 08
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • There’s a nicer way to do it:

      • Window > Open Perspective > Other… > Git Repository Exploring

      • Or… use magic: CTRL+3

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 09
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • There’s a nicer way to do it:

      • Window > Open Perspective > Other… > Git Repository Exploring

      • Add an existing Git repository

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 010
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • There’s a nicer way to do it:

      • Window > Open Perspective > Other… > Git Repository Exploring

      • Add an existing Git repository

      • Point to the location of your project 0 clone, and hit Search:

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 011
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • There’s a nicer way to do it:

      • Window > Open Perspective > Other… > Git Repository Exploring

      • Add an existing Git repository

      • Point to the location of your project 0 clone, and hit Search. Select your clone, and click ok.

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 012
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • There’s a nicer way to do it (cont’d):

      • Import project into your workspace

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 013
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Actually… there’s an even nicer way to do it:

      • Instead of using Git Bash, you could do everything from Eclipse!

      • File > Import… > Git > Projects from Git > Clone…

      • In the URI field, paste the SSH URI from BitBucket.

      • In the protocol field, select SSH

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 014
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Actually… there’s an even nicer way to do it:

      • Instead of using Git Bash, you could do everything from Eclipse!

      • File > Import… > Git > Projects from Git > Clone…

      • In the URI field, paste the SSH URI from BitBucket.

      • In the protocol field, select SSH

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 015
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Actually… there’s an even nicer way to do it:

      • Choose a Local Destination

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 016
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Actually… there’s an even nicer way to do it:

      • Choose a Local Destination

      • Select the Git repository to import

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 017
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Actually… there’s an even nicer way to do it:

      • Choose a Local Destination

      • Select the Git repository to import

      • Done!

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s get project 018
Let’s get Project 0!

  • Let’s import Project 0 in Eclipse!

    • Note: Whenever you import a Git project to Eclipse via the Git UI, you get some additional Eclipse functionality, via the Team menu:

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s solve project 0
Let’s solve Project 0!

  • Taking a look at Project 0 (ParallelSum)

    • Run test

    • Implement the test method: ParallelAdderTest.testTotalSum()

    • Run test again…

    • Implement ParallelAdderWorker.run()

    • Run test again…

    • Implement ParallelAdderWorker.getPartialSum()

    • Run test again…

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)


Let s solve project 01
Let’s solve Project 0!

  • Submit your solution:

    • Run git add on your modified files. (in Git Bash)

      • Or use the Eclipse Team menu

    • Run git commit –m “…”

    • Run git push

    • See your changes online: https://bitbucket.org/<user>/project0-<dirId>

CMSC433 Solving Project 0 (Getting started with BitBucket, Git and Eclipse)




ad