View on GitHub

git_for_humans

Git for humans

GitHub

  1. Please login to your GitHub account

  2. GitHub 10 min tutorial. You have now a bit of advantage for this game! https://guides.github.com/activities/hello-world/

Exercise 1

Let’s discuss

Break 10 min

Let’s have a small break

Exercise 2

In pairs, exchange GitHub usernames to update each other’s repos!

In order to make changes in another person’s repo you need to create a copy, called a Fork (A Fork is a copy of a repo on your own account). Then, make a Pull Request for the owner of the repo to accept or reject your changes. This is because you cannot push directly to someone else’ repo.

There are two ways to do this, depending on the needs:

  1. To suggest short/small updates to one file
  2. To suggest many changes to multiple files

We will do only a small suggestion to the README.md on your-neighbour/hello-world repository, this is option 1.

Happy Git!

On the other hand, option 2 (do it on your own time after the workshop), if you are going to suggest many changes to multiple files, I will recommend you make a local copy and change files on your computer. You do not need to do this now, but when you want to do it follow these instructions. https://help.github.com/articles/fork-a-repo/

Optional

Depending on time we can do the following exercises after exercise 1 and pushing exercise 2 to the end.

Exercise 1.1 (Optional)

Let’s make a copy of our online repo with clone, GitHub includes the string we need to identify the repo. We will use this hello-world repo as testing ground.

git clone https://github.com/yourusername/hello-world.git

Check your online repo pointers

git remote -v

For the next part you need to type your GitHub username and password. Note: There are ways to automate this, check on resources later.

Now, that we have a remote we will always want to verify that we have the latest changes before any new changes, remember to bring changes with pull

git pull origin master

Exercise 1.2 (Optional)

Exercise 1.3 (Optional)

Next: Atom