Practise with git and GitHub, requests except for my students' will be ignored, but feel free to send them in anyway.
This short and simple tutorial assumes you do at least have a basic understanding of git.
Follow the steps below in order.
Unsure what something means? Google it!
Read an entire step before your start typing.
Make sure that you are logged into your GitHub account.
If you have not already done so, make sure that you can connect to GitHub using SSH.
- Make sure that you have a SSH keypair on your local machine
- Make sure that added your SSH pubkey to your GitHub account.
Fork this repo to you own account.
Continue to step 2.
Pair up (sit next to each other so you can look at both screens). One student in each pair will fork this repo to their account. The other student will fork from their fellow student's repo.
In the following steps, "your fork" refers to the second fork you made. You will mostly be working on the machine of the student that forked their fellow student's fork. The first fork can later be used to accept all the requests you'll make while practicing.
Continue to step 2.
Clone your fork to your local machine.
Edit the file text.txt, then add and commit your changes.
Push your changes back to your repo on GitHub.
Create a merge request for the original repo to get your changes in there (on the main branch).
Check back onto your other machine, the merge request should be there.
On your command line, switch to the develop branch.
The file indev.txt should now be visible.
Edit indev.txt, then add and commit your changes.
Push your changes to your version of the develop branch on GitHub.
As before, create a merge request, this time, from your version of the develop branch to the original repo's version of the develop branch.
Try accepting the two merge requests on the other GitHub account.
- Does the fork of the fork need to do anything once the original fork has accepted the merge requests?
- Go through the steps again, reversing the role of the accounts, can you fork this repo if you've previously forked from a fork of this repo?