- Have you installed (i) R, (ii) RStudio, and of course (iii) git on your machine?
- Have you installed a bash compatible shell? (Windows only)
- Git for windows Comes pre-installed with Git, often providing all the necessary functionality for the course as the baseline requirement.
- Rtools shell comes pre-installed with Rtools
- Windows Subsystem for Linux (WSL) is an Ubuntu bash shell for Windows. Comes pre-installed with htop, apt-get, and make.
- Are they all updated to their most recent version?
- Have you already created an account on GitHub and have your password ready?
- Does your account have a profile picture? Your full name? 👀
- Make sure that some further software is installed
- Windows
- Install Rtools
- Install Chocolatey
- Mac
- Install Homebrew
- Configure C++ toolchain
- Linux
- None :)
- Windows
Note
Do not worry, not all of the resources need to be read. The resources have a large overlap, but some people might like one resource more than another (we certainly did observe this among us). Important is, that you get a first overview of what git, GitHub, and the shell are.
- Happy Git with R is a beginner-friendly website that introduces git with R and RStudio
- In addition, we recommend appendix A which links R, git, and the shell
- GitHub provides a nice CheatSheet
- GitLab also provides a nice CheatSheet
- TryBash is an interactive course and cheatsheet for basic bash commands
- Git Gud is a Python-based gamified introduction to git
- There's also this playlist on YouTube
- Code and Data for Social Science is a great text that can guide readers into important aspects of coding and data for social sciences
- Some sections may be more advanced, but the chapter on Version Control will be especially useful for us
- The Holy Grail, i.e. Grant McDermott's Lecture Notes has everything you need and more on Git, the shell, and anything else your mind might think of.
- My git is now irreversibly messed up
- Additional Reading
Note
A CheatSheet for bash can be found in the bash-cheatsheet folder.
- opening the shell on Mac, Linux, Windows
- Use bash or zsh preferably
- Windows may prefer Windows Subsystem for Linux (WSL)
- Is this better than using the shells from git or Rtools? Yes - for certain applications. WSL supports e.g. the native Linux package managers and provides an overall more seamless portal to Linux.
- WSL is like having your own Ubuntu terminal in RStudio without having to install Linux
- However, for working with git and performing simple operations, the shells from git or Rtools are plenty sufficient
- Introductory definitions
- What do all the weird symbols mean? (~ or $ or *)
- current working directory
- navigating directories
- creating folders
- deleting folders and files
- moving folders and files
- htop and process viewers
- installing software using brew (Mac), apt (Ubuntu), Chocolatey/Winget (Windows)
- What is a git folder?
- how to initialise a new git folder?
- gitignore
- making changes
- staging / unstaging changes
- committing
- branches/forks
- going back in history (various ways)
- keeping an overview with gitk
- logging in
- making a new repository
- private / public repos
- becoming a contributer (add them to this repo so that we can keep having all course notes in this repository)
- adding remote
- SSH
- adding a README
- pushing / pulling
- pull requests
- Github Issues
- merge conflicts
- continuous integration (??) --> standard when developing R and Julia packages but more complicated
- How to connect Git/Github with RStudio Projects
- Cloning an existing GitHub repository
- Uploading an existing RProject to GitHub