Code Monkey home page Code Monkey logo

yizongk-git-exercise-02's Introduction

Git Exercise 2

Summary

This is the second Git exercise and it is designed to extend your Git skillset. The first exercise was designed so that there would be no merge conflicts when you made the required changes to the files in the repository. In this exercise, there will be merge conflicts, but none that are too hard to resolve. The objective is to get you to understand how they can arise, and how they are resolved.

Unlike the first exercise, this one requires working in a small group of four (or five) people. In this description, this group is called "the team".

The Assignment

This README.md file is part of a GitHub repository to which you have read and write access but not administrative access.

Detailed Steps

  1. Make a note of who is on your team. The list of teams and their members is in a CSV file in this directory, teams.csv as well as in the assignment specification on the course website. Teams are rows in this file.

  2. Fork a copy of the repository of each team member to your publc repository. These respositories are in https://github.com/hunter-college-cs-ossd and have names like username-git-exercise-02 where username is their GitHub username.

  3. Now clone the forked repositories to your local machine as you did in the first exercise. Also clone your own repository to your local machine.

  4. For each repository that you cloned, add an upstream remote to this repository using the git remote add ... command. While you can use origin you might want to name it username-origin.

  5. For each of your team-mates' repositories that you cloned, as well as your own, you will do the same thing. Specifically, in the src directory in each repository, there is a C++ file named main.cpp. There is also a file named oddities.txt. The file oddities.txt has a collection of single-line sentences that are true facts. For each of these repositories you are to choose a different oddity.

    • Create a function, following the instructions in main.cpp, that prints this sentence to standard output with a terminating newline character and put this function in main.cpp in the place indicated.

    • Put a call to the function in main().

    • Compile and test your program to make sure it runs.

    • Track the source file using the git add command. Do not track the executable!

    • Commit your changes using the git commit command.

    • Using git, push the changes to your fork on the server, e.g. GitHub.

    • On the server, open a pull request to have the work reviewed and merged into the project.

  6. For your own repository, you will write a function that is called by main() before the others contributed by your team-mates. This function should state something like "This is a collection of strange but true facts.". This function should be in the same place in main.cpp as the other functions. You should also complete the program documentation, making yourself the author and giving credit where credit is due. You could even update the LICENSE file.

  7. You must handle all pull requests for your project. If there are merge conflicts, resolve them. This will require that you pull down the changes to your local machine, compile, build, and test. When you are convinced that everything is correct, you are done.

  8. When you have finished, notify the instructor by sending an issue.

yizongk-git-exercise-02's People

Contributors

stewartweiss avatar liudmilazyrianova239 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.