Intro to Git

Intro to Git

Git is probably the most popular version control system in the world, but how would you use it? This talk will teach you how to use git from the ground up, going from basic tasks like working with commits locally, to branching, merging, and even sharing you work through GitHub. Some basic familiarity with a *nix-style command-line is assumed.

Initially prepared for the Quantitative Science Working Group at the NIA, March 22, 2016
Reworked and presented at the 2016 DC-Baltimore Perl Workshop (http://dcbpw.org/dcbpw2016/), April 16, 2016

3ed7378b8a83d2952488d4edcd22c406?s=128

Stephen Belcher

April 16, 2016
Tweet

Transcript

  1. Intro to Git

  2. Intro to Me • Stephen Belcher-Saunders • @sycobuny on GitHub/Twitter

    • Programmer for NIA via Kelly Services • Baltimore Vim coordinator • http://baltimorevim.org/
  3. #!/usr/bin/env perl use warnings; use strict; use db; use const

    DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm
  4. #!/usr/bin/env perl use warnings; use strict; use db; use const

    DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.old.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.old.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.old.pm
  5. #!/usr/bin/env perl use warnings; use strict; use db; use const

    DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.old.2.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.old.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.old.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.old.pm
  6. #!/usr/bin/env perl use warnings; use strict; use db; use const

    DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.old.2.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.old.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.old.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.old.pm
  7. Version Control • Track changes to your code over time

    • WHO changed your code? • WHAT part did they change? • WHEN did they change it? • WHY did they change it? Version Control
  8. Git is Version Control • Command-line based, first • Web

    sites and GUI tools exist • Commands can be broken down to four parts $
  9. Git is Version Control • Command-line based, first • Web

    sites and GUI tools exist • Commands can be broken down to four parts git $
  10. Git is Version Control • Command-line based, first • Web

    sites and GUI tools exist • Commands can be broken down to four parts git <command> $ init config status commit
  11. Git is Version Control • Command-line based, first • Web

    sites and GUI tools exist • Commands can be broken down to four parts git <command> [cmdflags] $ --global -d -m "Message" --bare
  12. Git is Version Control • Command-line based, first • Web

    sites and GUI tools exist • Commands can be broken down to four parts git <command> [cmdargs] $ script.pl master origin fe52f0 [cmdflags]
  13. $ git <command> [cmdflags] [cmdargs]

  14. $ git <command> [cmdflags] [cmdargs] git

  15. $ <command> [cmdflags] [cmdargs] config git

  16. $ [cmdflags] [cmdargs] config --global git

  17. $ user.name "Your Name" [cmdargs] config --global git

  18. $ user.name "Your Name" config --global git ~/.gitconfig

  19. $ user.name "Your Name" config --global ~/.gitconfig git [user] name

    = Your Name
  20. $ user.name "Your Name" config --global ~/.gitconfig git [user] name

    = Your Name
  21. $ user.name "Your Name" config --global ~/.gitconfig git [user] name

    = Your Name
  22. $ user.name "Your Name" config --global ~/.gitconfig git [user] name

    = Your Name
  23. $ ~/.gitconfig user.email "you@example.com" git config --global email = you@example.com

    [user] name = Your Name
  24. $ ~/.gitconfig user.blarg "whatever" git config --global email = you@example.com

    [user] name = Your Name blarg = whatever
  25. ~/.gitconfig --global

  26. ~/.gitconfig --global /etc/gitconfig --system

  27. ~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system

  28. user.name "Sarah" user.name "Charlie" ~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system

    user.name "Stephen"
  29. user.name "Sarah" user.name "Charlie" $ git config ~/.gitconfig --global /etc/gitconfig

    $GIT_DIR/config --local --system user.name "Stephen" user.name --global
  30. user.name "Sarah" user.name "Charlie" $ git config ~/.gitconfig --global /etc/gitconfig

    $GIT_DIR/config --local --system user.name "Stephen" user.name --global Sarah
  31. $ ~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system user.name "Sarah" user.name

    "Stephen" user.name "Charlie" git config user.name
  32. ~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system user.name "Sarah" user.name "Stephen"

    user.name "Charlie" $ git config Stephen user.name
  33. project/ script_1.pl script_2.pl db.pm #!/usr/bin/env perl use warnings; use strict;

    use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm $
  34. project/ REPOSITORY script_1.pl script_2.pl db.pm #!/usr/bin/env perl use warnings; use

    strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm $ git init
  35. REPOSITORY project/ script_1.pl script_2.pl db.pm #!/usr/bin/env perl use warnings; use

    strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm $ git status ? ? ? "Untracked" ?
  36. REPOSITORY project/ #!/usr/bin/env perl use warnings; use strict; use db;

    use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm + + + $ git add . "Staged" +
  37. REPOSITORY project/ $ git commit COMMIT script_1.pl script_2.pl db.pm #!/usr/bin/env

    perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm + + +
  38. REPOSITORY project/ COMMIT script_1.pl script_2.pl db.pm $ git commit

  39. REPOSITORY project/ COMMIT script_1.pl script_2.pl db.pm Initial Pretty much works.

    $ git commit
  40. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm Initial $
  41. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm Initial $ .git/
  42. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm Initial $ .git/ $GIT_DIR
  43. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DAT => 'data.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DAT => 'data.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( @ARGV); # ... db.pm Initial $ git status "Clean" ✓ ✓ ✓ ✓
  44. project/ Initial $ #!/usr/bin/env perl use warnings; use strict; use

    db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm
  45. project/ Initial $ git status #!/usr/bin/env perl use warnings; use

    strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm "Modified" * * * *
  46. project/ Initial #!/usr/bin/env perl use warnings; use strict; use db;

    use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm * * * $ git diff
  47. project/ Initial #!/usr/bin/env perl use warnings; use strict; use db;

    use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ + + + git add . "Staged" +
  48. project/ Initial script_1.pl script_2.pl db.pm $ git commit

  49. project/ Initial script_1.pl script_2.pl db.pm File2+ENV -Add 2nd data file

    -Use ENV for DB, more secure now. $ git commit
  50. project/ Initial File2+ENV #!/usr/bin/env perl use warnings; use strict; use

    db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl $
  51. project/ Initial File2+ENV #!/usr/bin/env perl use warnings; use strict; use

    db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script_1.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl $ git diff script_1.pl
  52. $ git rm script_2.pl project/ Initial File2+ENV #!/usr/bin/env perl use

    warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script_1.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl - "Deleted" -
  53. $ git rm script_2.pl project/ Initial File2+ENV #!/usr/bin/env perl use

    warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script_1.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm "Deleted" -
  54. project/ Initial File2+ENV #!/usr/bin/env perl use warnings; use strict; use

    db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script_1.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ git mv script_1.pl script.pl "Renamed" ꔄ
  55. project/ Initial File2+ENV #!/usr/bin/env perl use warnings; use strict; use

    db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ git mv script_1.pl script.pl "Renamed" ꔄ ꔄ
  56. project/ Initial File2+ENV This project... It's awesome. Follow these steps,

    and you can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $
  57. project/ Initial File2+ENV This project... It's awesome. Follow these steps,

    and you can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ git status "Renamed" "Modified" "Untracked" "Clean" ꔄ * ? ✓ - "Deleted" script_2.pl -> ꔄ * ✓ ?
  58. project/ Initial File2+ENV This project... It's awesome. Follow these steps,

    and you can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ git add script.pl ꔄ ? ✓ + "Staged" +
  59. project/ Initial File2+ENV This project... It's awesome. Follow these steps,

    and you can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm $ git add README ꔄ ✓ + "Staged" + +
  60. project/ Initial File2+ENV script.pl README db.pm script_2.pl $ git commit

  61. project/ Initial File2+ENV script.pl README db.pm script_2.pl Cond+Docs -Condense scripts,

    much faster now -Add README :) $ git commit
  62. project/ Initial File2+ENV Cond+Docs #!/usr/bin/env perl use warnings; use strict;

    use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm This project... It's awesome. Follow these steps, and you can do awesome stuff too: 1) ... README $
  63. project/ Initial File2+ENV Cond+Docs LOG fe52f0feadc3251fdc Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2fa05dc05823 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c2513aadfd50689 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log
  64. project/ Initial File2+ENV Cond+Docs LOG fe52f0feadc3251fdc Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2fa05dc05823 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c2513aadfd50689 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log
  65. project/ Initial File2+ENV Cond+Docs LOG fe52f0feadc3251fdc Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2fa05dc05823 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c2513aadfd50689 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log
  66. project/ Initial File2+ENV Cond+Docs LOG fe52f0feadc3251fdc Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2fa05dc05823 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c2513aadfd50689 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log
  67. project/ Initial File2+ENV Cond+Docs LOG fe52f0feadc3251fdc Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2fa05dc05823 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c2513aadfd50689 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log 23,384,026,197,294,446,691,258,957,323,460,528,314,494,920,687,616
  68. project/ Initial File2+ENV Cond+Docs LOG fe52f0f Stephen 2016-03-24 19:26:16 Cond+Docs

    -Condense scripts, much faster now -Add README :) 0cdc3f2 Stephen 2016-03-24 19:10:23 File2+ENV -Add 2nd data file -Use ENV for DB, more secure now. d03c251 Stephen 2016-03-24 19:00:32 Initial Pretty much works. $ git log 23,384,026,197,294,446,691,258,957,323,460,528,314,494,920,687,616
  69. project/ This project... It's awesome. Follow these steps, and you

    can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $
  70. project/ This project... It's awesome. Follow these steps, and you

    can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git checkout 0cdc3f2
  71. project/ This project... It's awesome. Follow these steps, and you

    can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git checkout 0cdc3f2
  72. project/ package db; use warnings; use strict; use DBI; our

    $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git checkout 0cdc3f2 #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl
  73. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl # use warnings; # use strict; use db; use const X => 'tmp1.csv', X2 => 'tmp2.csv', Y => 'steve.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $
  74. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl # use warnings; # use strict; use db; use const X => 'tmp1.csv', X2 => 'tmp2.csv', Y => 'steve.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git diff script_2.pl
  75. project/ #!/usr/bin/env perl use warnings; use strict; use db; use

    const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git checkout script_2.pl
  76. project/ package db; use warnings; use strict; use DBI; our

    $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl $ git checkout master
  77. project/ package db; use warnings; use strict; use DBI; our

    $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd1.csv'; # ... script_1.pl #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd2.csv'; # ... script_2.pl $ git checkout master
  78. project/ This project... It's awesome. Follow these steps, and you

    can do awesome stuff too: 1) ... README #!/usr/bin/env perl use warnings; use strict; use db; use const DT1 => 'dat1.csv', DT2 => 'dat2.csv', CMD => 'cmd.csv'; # ... script.pl package db; use warnings; use strict; use DBI; our $dbh; $dbh = DBI->connect( $ENV{DSN}); # ... db.pm d03c251 0cdc3f2 fe52f0f $ git checkout master
  79. project/ d03c251 0cdc3f2 fe52f0f $ master

  80. project/ d03c251 0cdc3f2 fe52f0f $ master

  81. project/ d03c251 0cdc3f2 fe52f0f $ master git init

  82. project/ 0cdc3f2 fe52f0f $ master git commit d03c251

  83. project/ 0cdc3f2 fe52f0f $ master d03c251

  84. project/ 0cdc3f2 fe52f0f master d03c251 $ git commit 0cdc3f2

  85. project/ 0cdc3f2 fe52f0f master d03c251 $ 0cdc3f2

  86. project/ d03c251 0cdc3f2 $ git commit fe52f0f master

  87. project/ d03c251 0cdc3f2 fe52f0f master $ git checkout 0cdc3f2

  88. project/ d03c251 0cdc3f2 fe52f0f master $ git checkout master

  89. project/ d03c251 0cdc3f2 fe52f0f master $ git branch neato neato

  90. project/ d03c251 0cdc3f2 fe52f0f $ git commit neato 59d82e3 master

  91. project/ d03c251 0cdc3f2 fe52f0f $ git checkout neato neato 59d82e3

    master
  92. project/ d03c251 0cdc3f2 fe52f0f $ git commit neato 59d82e3 master

    a763d3e
  93. project/ d03c251 0cdc3f2 fe52f0f $ git checkout master neato 59d82e3

    master a763d3e
  94. project/ d03c251 0cdc3f2 fe52f0f $ git merge neato neato 59d82e3

    master a763d3e 4d3d3d3
  95. project/ d03c251 0cdc3f2 fe52f0f $ git branch -d neato neato

    59d82e3 master a763d3e 4d3d3d3
  96. project/ d03c251 0cdc3f2 fe52f0f $ git branch -d neato 59d82e3

    master a763d3e 4d3d3d3
  97. compy386 $

  98. compy386 $ GitHub

  99. compy386 $ GitHub git remote add origin git@github.com:you/project.git

  100. compy386 $ GitHub git remote add origin git@github.com:you/project.git

  101. compy386 $ GitHub git remote add origin git@github.com:you/project.git

  102. compy386 $ GitHub git remote add origin git@github.com:you/project.git

  103. compy386 $ GitHub git remote add origin git@github.com:you/project.git

  104. compy386 $ GitHub git push -u origin master

  105. compy386 $ GitHub

  106. compy386 $ GitHub git pull

  107. compy386 $ GitHub lappy486

  108. compy386 $ GitHub lappy486 git clone git@github.com:you/project.git

  109. compy386 $ GitHub lappy486 git clone git@github.com:you/project.git

  110. compy386 $ GitHub lappy486 git clone git@github.com:you/project.git

  111. compy386 $ GitHub lappy486 git clone git@github.com:you/project.git

  112. compy386 $ GitHub server

  113. compy386 $ GitHub server git commit

  114. compy386 $ GitHub server git push

  115. compy386 $ GitHub server git push

  116. compy386 $ GitHub server git push

  117. compy386 $ GitHub server git push

  118. Bonus Round Some More Resources

  119. Additional Good Info http://try.github.io/

  120. Additional Good Info https://git-scm.com/book/

  121. Additional Tools https://metacpan.org/pod/Git::Wrapper

  122. Additional Tools desktop.github.io www.gitkraken.com tortoisegit.org

  123. Additional Tools komodoide.com www.vim.org