Skip to content

Latest commit

 

History

History
140 lines (80 loc) · 4.85 KB

A2.GitGitHub.md

File metadata and controls

140 lines (80 loc) · 4.85 KB

Git/GitHub Assignment

  • INDIVIDUAL ASSIGNMENT
  • Due date: Feb-7th 11:59PM
  • How to submit: Finish both parts below and submit the following to BBLearn:
    1. The markdown file created as the result of Part 1
    2. A screenshot of the pull request (to my repository) created on Part 2

Description

This assignment is composed of two parts.

  • Part 1 consists of executing a sequence of commands and giving explanations about the commands you have to run. For each question, please provide appropriate explanation and/or the details requested.

  • Part 2 consists of creating a Markdown file on a fork of this course and creating a pull request towards this repo.

Part 1: Dealing with git

To conduct this, you will have to download handson.zip and unzip it in your local machine. Note: handson folder is a git repository.

Then, follow these steps:

On GitHub:

  1. Create a new repository under your GitHub account called OpenSource (it may be private);
  2. Create a file called "A2_GitHub.md";
  3. Copy the questions from this section and paste in your "A2_GitHub.md" file (tip: to copy the questions, click on "Raw" at the right-top of this file; this will show you the markdown source);
  4. For each empty grey box, please provide an answer to the questions below.
  5. Invite me to see your new repository. This will allow you to keep a private repository that only you and me will be able to see.

On your local machine: Using the command line, find and access the "handson/" directory (if you didn't download and unzip the file, go back to the beginning of Part 1's instructions). Then, answer the following questions (on your A2_GitHub.md file):

  1. List all the branches in this repository and, for each branch, list the commits.

    • Use git branch to list the branches in this repository.
    • Use git checkout to explore each branch.
    • Use git log --decorate to explore the structure of commits.


  1. Try git log --graph --all to see the commit tree. Paste the result here and write a paragraph to provide an interpretation of what you found.


  1. Choose an already existing branch and use git diff BRANCH_NAME to view the differences from a branch and the current branch. Summarize the difference from master to the other branch.


  1. Write a command sequence to merge the branch that is not the master branch into master.


  1. Write a command (or sequence) to (i) create a new branch called math (from the master) and (ii) change to this branch.


  1. Edit B.java adding the following source code below the content you have there.
System.out.println("I know math, look:");
System.out.println(2+2);
  1. Write a command (or sequence) to commit your changes.


  1. Change back to the master branch and change B.java adding the following source code (commit your change to master):
System.out.println("hello world!");
  1. Write a command sequence to merge the math branch into master and describe what happened.


  1. Write a set of commands to abort the merge.


  1. Now repeat item 9, but proceed with the manual merge (editing B.java). All implemented methods are needed. Explain your procedure.


  1. Write a command (or set of commands) to proceed with the merge and make master branch up-to-date.


  1. Complete Part 2. Then, come back here and answer the following: Report your experience of submitting the Part 2. Please, include the steps you followed, the commands you used, and the hurdles you faced (within the file you created for the Part 1).


Part 2: Using GitHub

The goal of this assignment is to put you in touch with the fork-pull request process, with an extra of dealing a little bit with Markdown. To learn more about Markdown click here.

To complete this submission, follow these steps:

  1. Fork the course repository (available here).

  2. Into the folder called students, create a markdown file called LASTNAME_FIRSTNAME.md (please change LASTNAME_FIRSTNAME for your actual last and first names).

  3. Use markdown to write a report of the last paper you've read. You can structure your markdown the way you want, but the following information must be there:

  • Title
  • Venue (journal name/conference)
  • Number of pages
  • Link to the paper online
  1. Commit your file and push to your own GitHub repository (CS499-OSS).

  2. Create a pull request to the course repository. Your pull request needs to appear here.

  3. Go back to Part 1 and answer the question 13 based on your experience in solving Part 2.

Your Part 2 submission is complete when your pull request is listed in the link above.