uva library workshop on introduction to git and github
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
foo.txt
helpful_links.md

README.md

git-intro

uva library workshop on introduction to git and github

https://github.com/alonzi/git-intro

Who am I?

Welcome to the UVA Library

First, some terms

  • git - version control software

  • github - a for profit company owned by microsoft

  • repository - a record of all changes to specified files (aka repo)

  • fork - a repo and a pointer to the repo it deviates from

  • visual

Second, our goals

  1. Everyone has git on their computer in working order
  2. Become comfortable with git/github workflows
  3. Know how to get help

Getting Git

  • to play along you will need a github account --> https://github.com/

  • if on mac/linux you probably already have git

    • go to the terminal and type git
    • if it says: -bash: git: No such file or directory (or something similar)
    • goto https://git-scm.com/ and download
  • if on windows you probably need to get git

Outline

  1. Some background
  2. Work through the GitHub browser interface
  3. Quick show of terminal interface
  4. Tips on getting help

Cartoons

A brief history (according to wiki)

Step 1 - inspect this repo

  • goto: https://github.com/alonzi/git-intro
  • we are in the github interface, nb:
    1. upper left corner: notebook icon next to alonzi/git-intro (a repo)
    2. big green button on the right hand side (down a little) says "Clone or Download" (how to get the files)
    3. list of files (how to browse the files)
    4. readme.md is shown in all its glory (github automatically shows the readme file, very handy)

Step 2 - create a repo

  • hard to find, upper right hand corner '+' button, pull down: select 'new repository'
    1. name
    2. description
    3. public v private
    4. initialize with readme (alway say yes)
    5. license

Step 3 - edit a file

  • click on readme.md in the list and then click the pencil
    1. now type in the editor
    2. when done click green button at bottom 'commit changes'
    • commits should be done early and often
    • no change is too small to commit
    • leave a message that is maybe 5 words long and includes a verb

Step 4 - collaboration

  • Direct Collaboration - collaborator
    • add a collaborator to your repo
    • setting tab (top of repo page) --> collaborators menu (LHS of settings page)
    • search users to add by username/email
    • This gives the collaborator power to commit directly
  • Indirect Collaboration - pull requests
    • click fork button (upper right of repo page)
    • look at upper left corner and note the new symbol and pointer
    • This is a completely functional independent repo
    • You may reccomend changes to the remote by initiating a pull request
      • click the pull request button
      • this is a little tricky so let's walk slowly
    • Demo, someone please pull request me and I'll show on screen what it looks like

Step 5 - local v cloud

Additional Items

  • Command Line Interface (CLI)
  • Organizations
  • Webpages
  • Branches

Getting Help (most important part so we end on it)

Helpful Links - https://github.com/alonzi/git-intro/blob/master/helpful_links.md

How to compare revisions

Ways to Practice

  1. Write some code
  2. Do the version control in github
  3. Ask a friend to review it

Plus some stuff

This repo contains materials from this repo