uva library workshop on introduction to git and github
- Senior Research Data Scientist with the Data Science Institute and UVA Library
- I like to be interrupted with questions! Please jump right in.
- Research Data Services
- Workshop Series
- Data Storage Best Practices (Bill Corey) Tuesday, 11/6 14:00 – 15:30 Brown 133
-
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
- Everyone has git on their computer in working order
- Become comfortable with git/github workflows
- Know how to get help
-
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
- goto https://git-scm.com/ and download
- Some background
- Work through the GitHub browser interface
- Quick show of terminal interface
- Tips on getting help
- http://phdcomics.com/comics.php?f=1531
- https://swcarpentry.github.io/2014-06-24-wise-penn/lessons/nelle-git/git.html
- https://xkcd.com/1597/
- Designed by Linus Torvalds
- initial release: 7 April 2005
- official repo: https://github.com/git/git
- most recent release (as of writing) 2.19.0 / 10 September 2018; 19 days ago
- goto: https://github.com/alonzi/git-intro
- we are in the github interface, nb:
- upper left corner: notebook icon next to alonzi/git-intro (a repo)
- big green button on the right hand side (down a little) says "Clone or Download" (how to get the files)
- list of files (how to browse the files)
- readme.md is shown in all its glory (github automatically shows the readme file, very handy)
- hard to find, upper right hand corner '+' button, pull down: select 'new repository'
- name
- description
- public v private
- initialize with readme (alway say yes)
- license
- click on readme.md in the list and then click the pencil
- now type in the editor
- 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
- 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
- downloading your code
- syncing your repositories sync to upstream
- Command Line Interface - cheat sheet
- Command Line Interface (CLI)
- Organizations
- Webpages
- Branches
- How to compose a google search
- What sources are reputable
- Then email: datascientist@virginia.edu
- Write some code
- Do the version control in github
- Ask a friend to review it
Plus some stuff