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

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

Stephen Belcher

April 16, 2016
Tweet

More Decks by Stephen Belcher

Other Decks in Technology

Transcript

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

    • Programmer for NIA via Kelly Services • Baltimore Vim coordinator • http://baltimorevim.org/
  2. #!/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
  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 #!/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
  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 => '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
  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. 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
  7. Git is Version Control • Command-line based, first • Web

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

    sites and GUI tools exist • Commands can be broken down to four parts git $
  9. 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
  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> [cmdflags] $ --global -d -m "Message" --bare
  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> [cmdargs] $ script.pl master origin fe52f0 [cmdflags]
  12. user.name "Sarah" user.name "Charlie" $ git config ~/.gitconfig --global /etc/gitconfig

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

    $GIT_DIR/config --local --system user.name "Stephen" user.name --global Sarah
  14. 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 $
  15. 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
  16. 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" ?
  17. 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" +
  18. 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 + + +
  19. 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 $
  20. 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/
  21. 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
  22. 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" ✓ ✓ ✓ ✓
  23. 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
  24. 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" * * * *
  25. 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
  26. 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" +
  27. 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 $
  28. 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
  29. $ 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" -
  30. $ 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" -
  31. 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" ꔄ
  32. 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" ꔄ ꔄ
  33. 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 $
  34. 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 -> ꔄ * ✓ ?
  35. 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" +
  36. 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" + +
  37. 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 $
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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 $
  45. 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
  46. 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
  47. 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
  48. 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 $
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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