Closed chrisburr closed 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.
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
..
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/
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.
Ah, thanks, Chris. I didn't realize there was a preview up. At a glance, it looks quite comprehensive and well-done.
Thanks, you're welcome to review the PR and if you have any other suggestions.
Added with lhcb/analysis-essentials#18.
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.