Skip to content

anthro-data-science/intro-to-git-and-github-for-anthropologists

Repository files navigation

Introduction to Git and GitHub for Social Scientists

Liying Wang, Anwesha Pan, Gayoung Park, Delaney Glass, Ben Marwick

Our workshop slides can be found here: https://drive.google.com/file/d/1clOau7UGIq3mhp5-25O18tn3Q0ndqL4k/view?usp=sharing

Schedule:

  • Welcome and schedule of workshop
  • Motivation for using Git and GitHub: why is this good to use? What is it similar to?
  • Define key tools & concepts such as Git, GitHub, remote, local, commit, push, pull
    • Activity 1: tour of GitHub page, go to your GitHub account and follow some people, make a repository
  • Define fork, clone and pull request
    • Activity 2: need to work in pairs, learn to fork, commit, and pull requests on GitHub. Using RStudio for cloning, editing, and pushing. Look at commit history and blame view on GitHub
  • Collaborating and resolving merge conflicts
    • Activity 3: need to work in pairs, learn to collaborate with Git & RStudio. Do the full cycle of fork, clone, commit, identify and resolve merge conflicts
  • Summary and conclusion

Setup instructions

Before you join the workshop, please make sure you have the most recent versions of Git, R and RStudio installed on your computer. Here's how to get those programs:

Git

Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com. You will need a supported web browser.

You will need an account at github.com for parts of the Git lesson. Basic GitHub accounts are free. We encourage you to create a GitHub account if you don't have one already. Make sure to check your email for a message from GitHub and click the link to confirm your email address with GitHub before joining the workshop. Please consider what personal information you'd like to reveal. For example, you may want to review these instructions for keeping your email address private provided at GitHub.

Windows

Video Tutorial
  1. Download the Git for Windows installer.
  2. Run the installer and follow the steps below:
    1. Click on "Next" four times (two times if you've previously installed Git). You don't need to change anything in the Information, location, components, and start menu screens.
    2. Select “Use the nano editor by default” and click on “Next”.
    3. Keep "Use Git from the command line and..." selected and click on "Next". If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.
    4. Click on "Next".
    5. Keep "Checkout Windows-style, commit Unix-style line endings" selected and click on "Next".
    6. Select "Use Windows' default console window" and click on "Next".
    7. Click on "Install".
    8. Click on "Finish".
  3. If your "HOME" environment variable is not set (or you don't know what this is):
    1. Open command prompt (Open Start Menu then type cmd and press [Enter])
    2. Type the following line into the command prompt window exactly as shown:

      setx HOME "%USERPROFILE%"

    3. Press [Enter], you should see SUCCESS: Specified value was saved.
    4. Quit command prompt by typing exit then pressing [Enter]

This will provide you with both Git and Bash in the Git Bash program.

macOS

Please open the Terminal app, type git --version and press Enter/Return. If it's not installed already, follow the instructions to Install the "command line developer tools". Don't click "Get Xcode", because that will take too long and is not necessary for our Git lesson. After installing these tools, there won't be anything in your /Applications folder, as they and Git are command line programs. For older versions of OS X (10.5-10.8) use the most recent available installer labelled "snow-leopard" available here. Because this installer is not signed by the developer, you may have to right click (control click) on the .pkg file, click Open, and click Open in the pop-up dialog. You can watch a video tutorial about this case.

Linux

If Git is not already available on your machine you can try to install it via your distro's package manager. For Debian/Ubuntu run sudo apt-get install git and for Fedora run sudo dnf install git.

R & RStudio

R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use RStudio.

Windows

Video Tutorial

Install R by downloading and running this .exe file from CRAN. Also, please install the RStudio IDE. Note that if you have separate user and admin accounts, you should run the installers as administrator (right-click on .exe file and select "Run as administrator" instead of double-clicking). Otherwise problems may occur later, for example when installing R packages.

macOS

Video Tutorial

Install R by downloading and running this .pkg file from CRAN. Also, please install the RStudio IDE.

Linux

You can download the binary files for your distribution from CRAN. Or you can use your package manager (e.g. for Debian/Ubuntu run sudo apt-get install r-base and for Fedora run sudo dnf install R). Also, please install the RStudio IDE.

Join Zoom Meeting

You can join our workshop at this link: https://washington.zoom.us/j/97631523248?pwd=eGtsNG1MMTJkTzVnQy9YK3lLYjFyQT09

Time: Aug 26, 2020 09:00 AM Pacific Time (US and Canada)

Meeting ID: 976 3152 3248

Passcode: 549527

Content on this site is licensed under a Creative Commons Attribution 4.0 International license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors