Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DFCI Introduction to Git and GitHub

DFCI Introduction to Git and GitHub

Data Science Seminar
Department of Data Sciences
Dana-Farber Cancer Institute

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Patrick Kimes

November 27, 2018
Tweet

More Decks by Patrick Kimes

Other Decks in Programming

Transcript

  1. Introduction to Git and GitHub Patrick Kimes, PhD Postdoctoral Fellow

    Dana-Farber Cancer Institute Harvard TH Chan School of Public Health Data Science Seminar November 27, 2018
  2. GitHub Git software for managing files in a folder (repo)

    GitHub cloud service for hosting Git repos
  3. GitHub Git software for managing files in a folder (repo)

    GitHub cloud service for hosting Git repos
  4. GitHub Git software for managing files in a folder (repo)

    GitHub cloud service for hosting Git repos
  5. Git software for managing files in a folder (repo) version

    control software http://phdcomics.com/comics.php?f=1323 “I already have a system”
  6. rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R version control software “I already

    have a system” ad infinitum… rnaseq-analysis-update2-final.R rnaseq-analysis.R rnaseq-analysis-update.R rnaseq-analysis-update2.R rnaseq-analysis-update2-final-pkk.R
  7. version control software Git history of files is stored as

    a series of commits rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R rnaseq-analysis.R
  8. version control software Git history of files is stored as

    a series of commits rnaseq-analysis.R
  9. version control software Git history of files is stored as

    a series of commits commit snapshot of file + useful message rnaseq-analysis.R
  10. version control software Add new analysis Update analysis parameters Try

    new method Remove older results Clean up notes for release rnaseq-analysis.R
  11. version control software Add new analysis Update analysis parameters Try

    new method Remove older results commit 6e40a27cb9415fd98fa3ef068efbb5e22eb7d497 Author: First Last <[email protected]> Date: Sun Nov 18 11:10:25 2018 -0500 Clean up notes for release rnaseq-analysis.R
  12. rnaseq-analysis.R more commonly visualized horizontally Add new analysis Update analysis

    parameters Try new method Remove older results Clean up notes for release
  13. rnaseq-analysis.R checkout an older commit Add new analysis Update analysis

    parameters Try new method Remove older results Clean up notes for release
  14. rnaseq-analysis.R Add new analysis Update analysis parameters Try new method

    Remove older results Clean up notes for release inspect a diff between two commits
  15. rnaseq-analysis.R Add new analysis Update analysis parameters Try new method

    Remove older results Clean up notes for release commit best practices
  16. rnaseq-analysis.R Add new analysis Update analysis parameters Try new method

    Remove older results Clean up notes for release commit best practices 1. commits should be complete
  17. 1. commits should be complete 2. commit messages should be

    meaningful commit best practices https://xkcd.com/1296/ https://chris.beams.io/posts/git-commit/
  18. repo folder of files; a Git project Git version control

    software for managing files in a folder
  19. repo folder of files; a Git project commit snapshot of

    files in a repo Git version control software for managing files in a folder
  20. GitHub GitHub cloud service for hosting Git projects Git version

    control software for managing files in a folder git repo
  21. GitHub GitHub cloud service for hosting Git projects Git version

    control software for managing files in a folder git repo git repo
  22. GitHub is more than just a cloud sharing collaboration share

    the complete Git history open the code to suggestions and fixes
  23. GitHub cloud service for hosting Git projects GitHub git repo

    git repo remote hosted copy of a repo local remote
  24. GitHub cloud service for hosting Git projects GitHub git repo

    git repo remote hosted copy of a repo local remote push/pull sync commits between local/remote push
  25. GitHub cloud service for hosting Git projects GitHub git repo

    git repo remote hosted copy of a repo local remote push/pull sync commits between local/remote pull push
  26. push/pull sync commits between local/remote GitHub cloud service for hosting

    Git projects GitHub git repo git repo git repo remote pull push local local remote hosted copy of a repo pull push
  27. repo folder of files; a Git project commit snapshot of

    files in a repo Git version control software for managing files in a folder
  28. repo folder of files; a Git project commit snapshot of

    files in a repo Git version control software for managing files in a folder GitHub cloud service for hosting Git projects remote remote copy of repo push/pull sync commits between local/remote
  29. enough with the what, on to the how what you’ll

    need: 1.Git 2.GitHub account 3.Git GUI client GitHub Desktop GitKraken
  30. enough with the what, on to the how what you’ll

    need: 1.Git 2.GitHub account 3.Git GUI client 1. 2. 3. /username
  31. enough with the what, on to the how what you’ll

    need: 1.Git 2.GitHub account 3.Git GUI client link local/remote 1. 2. 3. /username
  32. Alice Bartlett Senior Developer, Financial Times @alicebartlett Git for humans

    Git for humans https://speakerdeck.com/alicebartlett/git-for-humans