You have forked gm-languages repo -- which is a collection of information about programming languages -- to your account as [[ username ]]-gitmastery-languages and cloned it to your computer as languages. It has two commits.

gitGraph BT:
    commit id: "Add C.txt"
    commit id: "[HEAD → main] Add Python.txt"

Now you wish to contribute repo gm-languages through a PR.

  1. Add a file Java.txt and commit it to the main branch, and push it to your fork, as follows:
    echo -e "1905, by James Gosling" >> Java.txt
    git add Java.txt
    git commit -m "Add Java.txt"
    git push origin master
    
  2. Create a PR from your fork to the upstream repo gm-languages. You may use any suitable PR title and a description.
  3. Change the year in Java.txt from 1905 (which is incorrect) to 1995 (the correct year Java was crated). Update the PR to reflect this correction.

Exercise create-pr-from-main

This exercise is currently under development/testing, not yet released to users.

To download the exercise:

  • Navigate inside the gitmastery-exercises folder.
  • Run gitmastery download create-pr-from-main command.

Scenario:

You have forked gm-languages repo -- which is a collection of information about programming languages -- to your account as [[ username ]]-gitmastery-languages and cloned it to your computer as languages. It has two commits.

gitGraph BT:
    commit id: "Add C.txt"
    commit id: "[HEAD → main] Add Python.txt"

Now you wish to contribute repo gm-languages through a PR.

Your task:

  1. Add a file Java.txt and commit it to the main branch, and push it to your fork, as follows:
    echo -e "1905, by James Gosling" >> Java.txt
    git add Java.txt
    git commit -m "Add Java.txt"
    git push origin master
    
  2. Create a PR from your fork to the upstream repo gm-languages. You may use any suitable PR title and a description.
  3. Change the year in Java.txt from 1905 (which is incorrect) to 1995 (the correct year Java was crated). Update the PR to reflect this correction.

To verify your work:

  • Navigate to anywhere inside the gitmastery-exercises/create-pr-from-main folder (or any sub-folder of it).
  • Run the gitmastery verify command.

To reset the exercise and start over, navigate to the gitmastery-exercises/create-pr-from-main folder and run the gitmastery progress reset command.