How to time travel with your code

Foundations of Git connectivity with RStudio

Git
Github
Version Control
Beginner
Author

Simisani Ndaba

Published

April 30, 2022

Meetup Description

Gracielle Higino covers foundations of version control, useful git commands and connections with RStudio. Gracielle generously edited the recording on YouTube which you can find at the bottom of the page.

Foundations of Git connectivity with Rstudio

Some Git command best practises


Best practices - committing -


  • Write short messages with action verbs (e.g., “fix import data code”)

  • Try to commit every saved change, or group saved changes by theme (e.g., when adding a reference to a manuscript, this change only makes sense when the citation is committed as well)

  • Add emojis for fun and quick reference!

  • Attention to large files

Best practices - push & pull -


  • Always start your day with git pull!

  • Always finish your day with git push!

  • Don’t wait until the end of your day to push…

  • Push & pull as often as possible

best practices - branching -


  • Use the main branch only for fundamental changes

  • When working on teams, have a convention for naming the branches (you can “nest” branches using / - e.g.: INTRO/ecological_niche)

  • Pull requests are safer! Only merge final changes.

  • Always branch to test new things – never do it on the main

Back to top