Ricky Patterson

rjp0i website

UVA workshop!

-Last updated 28-Jan-2020

Fork edits

git-intro

Changes made here. More changes.

UVA Library Workshop on Introduction to Git and GitHub/GitLab.

This file exists here: https://github.com/rjp0i/git-intro (or visit here for a prettified view)

About Me

Data Resources in the UVA Library

First, our goals

  1. Everyone has a GitHub and GitLab account, and has GitHub Desktop running on their computer
  2. Create a repository and fork it
  3. Feel comfortable with git/github workflows
  4. Know how to get help

Second, some terms

Git Glossary

You can look at GitHub’s Git Handbook

Getting Git

Outline

  1. Some background
  2. Work on the GitHub browser interface
  3. Look at the GitHub Desktop interface
  4. Tips on getting help

Reference for Git

The book Computing Skills for Biologists: A Toolbox contains a useful introduction to Git with practice data and code. Members of the UVA community can access the book online. The examples, data, code, and solutions are hosted on a github repo.

A brief history of Version Control

Getting Started: Hello World

Using Github

Step 0 - Inspect this Current Repo

Step 1 - Create your own Repo

https://guides.github.com/activities/hello-world/#repository

Step 2 - Create a Branch (for Direct Collaborators)

https://guides.github.com/activities/hello-world/#branch

Now we have two branches: master and readme-edits

Step 3 - Edit a File and Commit Changes

https://guides.github.com/activities/hello-world/#commit

Step 4 - Making Pull Requests

https://guides.github.com/activities/hello-world/#pr

GitHub Flow

https://guides.github.com/introduction/flow/

Forks - Indirect Collaboration

If you are not a collaborator in a repo, you can’t branch that repo. However, you can “fork” it, which is just creates a clone of the repo on the GitHub server.

  1. You can’t push changes directly back to the original repo.
  2. You’ll want to work on keeping your fork in sync with the project
    • add it to the original project as a remote, or
    • fetching regularly from the original repo

Try forking from my repo, and make changes to the resulting fork, and then submit a pull request to me!

Additional Items

Getting Help

How to compare revisions

Ways to Practice

  1. Write some code, or some text
  2. Do the version control in github
  3. Edit it yourself
  4. Have a friend do some edits as well

# This is an additional edit for practice. Hopefully this works