Session - Workflow with {usethis} and {gert}
Terminal tab in RStudioUsing two packages:
Terminal or Console?
The Console starts with > and is for R
The Terminal starts with $ and is for git but other things too like quarto
Remember!
*.Rproj if it’s a projectRather than working on the main branch we need a copy called “new_work”
In the Git pane three new items will have appeared
*.qmd file*.html file from the rendered quartoAdd to the YAML (the first few lines at the top)
And render again - the folder will disappear.
Individual new files can be staged with code or by ticking the box next to the file in the RStudio Git pane
Shift and click the second file to highlight down (or arrow down)This records the changes with a message in Git
Stage everything and do the commit message at the same time!
Watch out!
This will only stage files that have already been “seen” as in committed.
New files will get missed by this command.
Let’s correct the misspelling of quatro to quarto using a feature of RStudio
Commit button in the Git pane of RStudio (a pop up will appear)Amend previous commit under the Commit message (starts off blank)quarot for quarto and then click the Commit button.Committing frequently is beneficial but can create a lot of history (commits)
M icon next to itgert::git_add("name_of_file.qmd") or tick in RStudioAmend previous commit
History
*.qmd and *.html, click on the qmd filemain
gert::git_commit_all("Removed author and created slides")
Happy Git and GitHub for the useR by Jenny Bryan
Pull Request Flow with usethis by Garrick Aden-Buie