Share
Embed
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
Transcript
123 slides
-
Intro to Me • Stephen Belcher-Saunders • @sycobuny on GitHub/Twitter
• Programmer for NIA via Kelly Services • Baltimore Vim coordinator • http://baltimorevim.org/ -
#!/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.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 -
#!/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 -
#!/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 -
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 -
Git is Version Control • Command-line based, first • Web
sites and GUI tools exist • Commands can be broken down to four parts $ -
Git is Version Control • Command-line based, first • Web
sites and GUI tools exist • Commands can be broken down to four parts git $ -
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 -
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 -
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] -
$ ~/.gitconfig user.email "[email protected]" git config --global email = [email protected]
[user] name = Your Name -
$ ~/.gitconfig user.blarg "whatever" git config --global email = [email protected]
[user] name = Your Name blarg = whatever -
user.name "Sarah" user.name "Charlie" $ git config ~/.gitconfig --global /etc/gitconfig
$GIT_DIR/config --local --system user.name "Stephen" user.name --global -
user.name "Sarah" user.name "Charlie" $ git config ~/.gitconfig --global /etc/gitconfig
$GIT_DIR/config --local --system user.name "Stephen" user.name --global Sarah -
$ ~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system user.name "Sarah" user.name
"Stephen" user.name "Charlie" git config user.name -
~/.gitconfig --global /etc/gitconfig $GIT_DIR/config --local --system user.name "Sarah" user.name "Stephen"
user.name "Charlie" $ git config Stephen user.name -
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 $ -
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 -
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" ? -
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" + -
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 + + + -
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 $ -
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/ -
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 -
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" ✓ ✓ ✓ ✓ -
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 -
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" * * * * -
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 -
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" + -
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 -
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 $ -
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 -
$ 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" - -
$ 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" - -
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" ꔄ -
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" ꔄ ꔄ -
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 $ -
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 -> ꔄ * ✓ ? -
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" + -
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" + + -
project/ Initial File2+ENV script.pl README db.pm script_2.pl Cond+Docs -Condense scripts,
much faster now -Add README :) $ git commit -
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 $ -
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 -
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 -
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 -
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 -
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 -
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 -
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 $ -
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 -
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 -
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 -
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 $ -
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 -
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 -
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 -
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 -
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 -
project/ d03c251 0cdc3f2 fe52f0f $ git merge neato neato 59d82e3
master a763d3e 4d3d3d3 -
project/ d03c251 0cdc3f2 fe52f0f $ git branch -d neato neato
59d82e3 master a763d3e 4d3d3d3 -
project/ d03c251 0cdc3f2 fe52f0f $ git branch -d neato 59d82e3
master a763d3e 4d3d3d3