lhcb / starterkit-lessons

Lessons taught at the Starterkit workshops.
https://lhcb.github.io/starterkit-lessons/
Other
34 stars 91 forks source link

Add git lesson #14

Closed chrisburr closed 7 years ago

goi42 commented 7 years ago

Benign comment: When I participated in the StarterKit, we were taught using GitHub. I don't know what's planned, but I suggest that using GitLab is a better way to go, given that it's pretty essential to working in LHCb.

goi42 commented 7 years ago

Not sure what's planned for the lessons, but a colleague asked that we not teach people the (terrible) practice of using git commit -a and also to introduce the concept of .gitignore as good practice.

alexpearce commented 7 years ago

I think git commit -a is fine if you understand the intention. The danger is if you teach something like "you commit by doing git commit -a", rather than explaining that you normally first stage individual files with git add (or individual hunks with git add -p), then git commit..

chrisburr commented 7 years ago

The PR to add the git lesson is here lhcb/analysis-essentials#18. It is based on the software carpentry lesson but uses CERN GitLab instead of GitHub. It also advises against using git commit --all.

You can view a preview of it at: https://chrisburr.me/git-lesson-preview/git/

goi42 commented 7 years ago

Yeah, I think his concern is mostly the potential for abuse. Being in the habit of using -a encourages poor documentation; I think I agree with him that it's probably not worth it to teach it in an intro course.

goi42 commented 7 years ago

Ah, thanks, Chris. I didn't realize there was a preview up. At a glance, it looks quite comprehensive and well-done.

chrisburr commented 7 years ago

Thanks, you're welcome to review the PR and if you have any other suggestions.

chrisburr commented 7 years ago

Added with lhcb/analysis-essentials#18.