SESYNC-ci / advanced-git-lesson

Learn advanced git techniques with GitHub and RStudio

Home Page:https://sesync-ci.github.io/advanced-git-lesson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewrite beginning of lesson to enable clean start

qdread opened this issue · comments

The lesson should explicitly give instructions for starting with a clean, never-before-used repository. Also, it's probably better for everyone to create the repo remotely and pull it locally. Make sure to initiate it with a readme, so it counts as a commit and there is a main branch!!! If you don't have that, there will be no main branch and you will not be able to create a new branch. However, the error you get is confusing: fatal: Not a valid object name: 'main'.

Also, if people are starting from scratch with this lesson, in particular on the rstudio server, they will need to run the git config steps that are written in the basic git and git in the shell lessons. This might not be necessary but would be good to also include in this lesson.

Overall, the beginning is a bit rough as well. When teaching, I assumed people knew their way around the Rstudio gui and how to work in the rstudio server, as well as knowing about GitHub in addition to git, which we can't necessarily assume. This may not require changing the content extensively but future instructors should be aware of that.

might be more related to #7 but for making it clear what needs to be done ahead of time for this to work proper - the basic git lesson has students first create the repo in rstudio (to do configuration), and the new repository on github is started WITHOUT a readme.

I think either direction could work, but in the interest of having the lesson work well outside of rstudio, I think it may be better to tell them to create the repo on Github with a readme, then give the option of either cloning with git clone in terminal, or with rstudio dialog. The git in the shell lesson already shows how to do a git init locally, which we could always mention in this lesson as well for completeness.

The "branching" part of the lesson now quickly runs through how to create a repo on github and clone it locally, whether directly from the terminal or through the rstudio new project interface. So now the lesson can start up cleanly for all students.

See commit 865ee43