Final: social git

Aug 7, 2013 • David Perez-Suarez

More and more I see how much useful platforms as github and bitbucket help us do our work.  I would like to make a 10′ course on how to use github while introducing the basic of git.  It’s not a very advanced topic, but I think it helps a lot.  I’ll give such tutorial to a few colleagues at work, but I’m open to do it with others in the course through hangout too.

Comments? suggestions?

UPDATE — 17/Aug/2013:  Mindmap added

This mindmap shows the difference between cloning and forking a public repository on a social git platform (eg. github, bitbucket, gitlab, …), Pull Requests are used to ask the maintainer of the repository to pull your improvements to the code — who can accept/merge it, hold it till new improvements are included or decline it. Also, code can be fetched from other forks (as Bilbo does from Gandalf). Finally, forking can be done on forks of forks (Sam does it from Frodo who did it from Bilbo).  Notice that Forks are “controlled” clones, so their differences/evolutions can be tracked.

Bilbo's workflow<figcaption class="wp-caption-text">JRRT has a repository where he is creating a map of Middle Earth. Other people are also contributing by using the social side of git.
Click on the image for a larger version.</figcaption></figure> UPDATE — 3/Sep/2013: Questions, Slides and Feedback.

To think which questions to ask was the bit that took most effort.  I’ve been trying to think different kinds of questions to do for what I wanted to teach, which was how github makes our life easier.  After few iterations in my mind on how I could teach that I found that the concepts I needed to explain were “fork” and “pull request”. As Ted mentioned in the comments below, these are terms not available in the git documentation.  But, then, how can I ask questions to check whether these concepts were assimilated?  I then opt by a True/False (and why) kind of questions.  At first they seemed quite trivial, but when analysing the results from my “guinea pigs” I realize they were not too bad.

So, the questions were:

  1. Fork and Branch are synonymous.  True/False Why?
  2. A Pull-Request made to repo-A can be modified by any user with administrative privileges to such repo-A.  True/False Why?
  3. On any open repository on github any user can comment on the code of a Pull-Request.  True/False Why?

I will comment about the answers in a second, but to follow the chronological order of the events here is, then, the slides I did after I thought on the questions:

Originally, I had planed to give this talk just once to five or so people, but some people were not available last week and they requested to repeat it this week. For the first group, just 3 people showed up, I had required they had a basic knowledge of version control software, if that was git the better. I went through the slides and discussion in less than 20 minutes. The second time (today), the group was double the size the first time and not all were familiar with version control software, so I took almost an hour. I delivery took more time explaining why we want control version, tell some more details regarding git, showing some examples, and even we did a quick hands-on session.

I didn’t get much of a feedback, all of them were happy, and, surprisingly for me, everyone learn something new! (I thought that two of them were quite familiar with github, but it turns out they were not that much).
Regarding the questions, everybody got most of them right. Though I did a test myself. On the first group I gave more hints for the second question than in the second group, where I show it on the “demo” part, and it was interesting to see that all the first group answered it correctly whereas all the second group got it wrong. That question, I could have given it as right in either True or False, by seeing the reasoning behind (for example the admin user could have done a pull-request to the repository that have done the pull-request). Nevertheless, it shows me how much of a difference can be made on the people by just making a clear statement during the class.

I really loved the “experiment” and now I’m looking forward to next time that I will need to explain something, as I know better now how to do so. Thanks Greg!