..

Exercise 2

Create a folder with the name “assignment2” with the following files

.
├── main.c
└── README.md
// main.c should include the following

#include <iostream>
using namespace std;

int main(){
  cout << "yet another assignment!" << endl;
  return 0;
}
  1. Initialize a new repository.

  2. Create a seperate devv branch, checkout into it and add the following the README.md file:

# Assignment 2

This is a markdown file.
  1. Go back to the main branch and modify the program to print “I have to solve yet another assignment!”

Wait, isn’t this question almost identical to the first one?

  1. Rebase the devv branch on the main branch.

  2. Merge the main branch with the devv branch and delete the devv branch.

Try sketching each commit in a tree structure, that will surely help you understand the difference. git log helps too.