SherpadNdabambi / getting-started

A simple introduction to the Git/GitHub workflow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Starter Project

Table of Contents

Contents
  1. About
  2. How to Complete the Project

About

This is a simple introduction to the Git & GitHub workflow.

How to Complete the Project

  1. To get started, create a fork of this repository and cd into it.

    gh repo fork "https://github.com/SDI1/starter-project"
    cd starter-project/
    
  2. Build and run "hello.cpp"

    g++ hello.cpp -o hello
    ./hello
    

    You should see output like this:

    Starter Project Screenshot 1

  3. You are now going to edit the program to print your name. Create a new branch.

    git checkout -b "add-name"
    
  4. Open "hello.cpp" with your favourite text editor or IDE and add the following line.

    cout << "Hello, <insert your name here>!\n";

    Starter Project Screenshot 2

  5. Build and run again.

    g++ hello.cpp -o hello
    ./hello
    

    This time the program should also display your name.

    Starter Project Screenshot 3

  6. Now commit your changes.

    git add .
    git commit -m "Add name"
    
  7. Push your changes to the branch.

    git push -u origin "add-name"
    
  8. Open a pull request.

    gh pr create
    

About

A simple introduction to the Git/GitHub workflow.


Languages

Language:C++ 100.0%