►
From YouTube: Repo 911 - Git Merge 2017
Description
Kyle Macey instructs us how to clean up our out of control
repositories with filter-branch and BFG, and then moves on to tips for using git-lfs for a healthier tomorrow.
About GitMerge
Git Merge is the pre-eminent Git-focused conference: a full-day offering technical content and user case studies, plus a day of workshops for Git users of all levels. Git Merge is dedicated to amplifying new voices in the Git community and to showcasing the most thought-provoking projects from contributors, maintainers and community managers around the world. Find out more at git-merge.com
A
Repo
9-1-1
is
a
little
play
off
of
an
American
TV
TV
show
called
Reno
911
one.
It's
a
police
action,
comedy
TV
show
and
9-1-1
is
our
emergency
phone
number
in
the
united
states.
I
think
here
in
europe,
it's
like,
oh
one,
one,
eight,
nine,
nine,
nine,
eight,
eight
one,
nine,
nine,
nine
one,
one,
nine,
seven,
two,
five,
three,
alright
cool!
I
did
not
memorize
that,
for
this
talk,
just
a
really
big
IT
Crowd
fan.
So
for
those
of
you
who
were
here
earlier
for
the
workshops.
You're
like
I.
Was
this
guy
again?
A
What's
he
going
to
do
this
time
jump
into
an
IRC
Channel
to
try
to
get
help
with
talking
about
whatever
it
is
he's
doing?
For
those
of
you
who
are
not
here
earlier,
I
am
Kyle
Macy
I
am
a
services
tools.
Engineer
at
github
is
a
team
that
was
just
created
last
week.
I
kind
of
shifted
over
into
this
position
we're
working
on
some
really
cool
tools
for
getting
started
with
github
migrating
into
github,
making
it
easier
for
people
to
just
launch
and
go
with
it
a
little
bit
of
a
personal
plug
here,
shameless
plug.
A
A
A
So
yes,
before
we
kind
of
go
into
what
sort
of
scenarios
we're
looking
at
I
want
to
kind
of
introduce
the
tools
that
we're
going
to
be
using
today,
the
first
being
The
BFG
repo
cleaner.
This
is
a
Java
based
utility
that
is
an
alternative
to
get
filter
branch.
It
is
specifically
targeted
towards
removing
large
files
from
repositories.
I
am
scrubbing
sensitive
data
data
from
your
git
history.
A
We're
also
going
to
be
taking
a
little
bit
of
a
look
into
get
LFS,
which
is
the
awesome
utility
that
I
think
was
just
developed
in
the
past
year
or
so
I
think
there's
actually
some
people
here
that
work
on
it.
Can
you
raise
your
hand
if
you
work
on
LSS
I
thought
no
they're,
not
in
the
room?
Oh
good
timing,
they're
like
ask
them
questions
to
make
them
raise
their
hand
and
all
right.
A
A
You
know
this
could
be
like
the
old
artifacts.
This
could
be
your
project
assets,
your
class
files,
things
that
get
wasn't
necessarily
built
originally
to
handle.
We
all
know
that
get
is
super
fast,
but
a
large
part
of
that
is
because
it's
built
with
the
assumption
that
we
would
only
be
versioning
source
code
and
some
people
have
a
tendency
to
gently,
ignore
that
and
put
other
things
in
there,
and
so,
when
we
start
putting
these
large
binary
non
virginal
files
into
kit,
it
starts
to
slow
down
considerably
and
your
especially
your
network
operations.
A
We
talked
a
little
bit
about
cloning,
can
take
a
very
long
time
pushing
and
pulling
anything
over.
The
wire
can
take
a
long
time.
If
you're
cloning
for
your
continuous
integration,
you
may
be
waiting
a
day
and
a
half
before
your
build
is
done
even
your
local
operations,
depending
on
how
much
you've
stuffed
into
this
repository.
Checkouts
commits
all
these
things
can
take
a
lot
of
time
and
will
look
a
little
bit
into
that
as
well.
A
A
Don't
have
any
real
meaning,
but
it
kind
of
helps
illustrate
some
of
the
scenarios
that
you
might
walk
into.
There
is
a
github
URL
here:
let's
low
disclosure,
I
accidentally
pushed
up
the
cleaned,
smaller
version
of
the
repository.
Shortly
before
this
talk,
and
in
order
for
me
to
put
the
large
ugly
one
gigabyte
repository
back
up
into
github
on
the
conference,
Wi-Fi
would
take
approximately
six
to
seven
days
and
as
much
as
you
would
probably
love
to
sit
here
and
watch
that
happen.
A
Unfortunately,
I
don't
feel
like
entertaining
that,
but
let's
take
a
quick
look
at
what
this
project
looks
like
I've
got
it
cloned
down
so
here
to
explain
how
we're
going
to
make
this
work.
I
have
the
repository
cloned
down
locally
into
a
root
folder
a
lot
of
the
commands
that
I'll
show
you
will
be
using
the
github
URL
when
we
actually
put
them
into
the
console
will
be
cloning
from
that
local
repository.
So
that
way,
we're
not
waiting.
A
A
Again,
arbitrary,
just
kind
of
wanted
to
make
an
example,
and
we,
our
actual
source
code,
is
only
just
like
our
one
file
project
dot
RB.
You
can
bring
that
bottom
again.
This
is
going
to
be
like
the
last
talk
all
over
again,
where
I
tried
to
figure
this
out
this
time.
Hector
isn't
here
to
help
me:
that's
alright!
A
A
Oh,
come
on
alright
I
know
that's
kind
of
whoa.
Now
I
really
want
to
fix
this
I'm
sorry
get
up
there.
That's
not
what
I
want
you
to
do
hold
on
hold
on
hold
on.
How
do
you
just
press
up
yeah?
Oh
look
at
that.
Please
like
if
you
want
to
team
up
sometime
this
guy
occupy
Mars.
That
is
a
great
shirt.
Thank
you.
Alright,
yeah
anyway,
so
we
have.
A
We
have
this
little
gold
script
here,
as
you
see,
all
does
is
make
sure
that
the
bill
directory
exists
and
takes
some
random
data
and
chunks
it
into
a
file
there.
If
we
look
a
little
bit
as
well,
we
also
had
a
script
commit,
which
is
also
you
wouldn't
believe
it.
But
this
is
something
that
I've
seen
before
in
the
real
world,
where
they
don't
bother
to
teach
developers
how
to
use
git,
so
they
give
them
one
shell
scripts,
that
they
can
run.
A
A
Another
thing
that
you
might
see
that
this
kind
of
represents
is
machine
commits,
like
you
might
have
a
CI
or
some
other
server
that
will
generate,
commits
and
push
them
up
indiscriminately,
so
you
may
run
into
this.
So
out
of
all
these
things,
does
any
of
this
look
familiar
to
anybody?
You
raise
your
hand.
Have
you
seen
stuff
like
this?
Okay
got
a
few
hands.
Alright.
Does
anybody
think
this
is
a
good
idea?
Okay,
good
just
making
sure
we're
all
on
the
same
page
here.
A
A
A
So
some
things
that
you
might,
if
you're
thinking
of
doing
something
like
this,
you
may
want
to
consider
locking
the
original
repository
telling
your
developers
and
your
co-workers
to
you
know
take
a
day
off.
While
we
try
to
reduce
the
size
of
this
repository,
you
may
want
to,
like
I,
said,
create
a
new
remote
for
pushing
up
the
reduced
size,
one
backup
everything.
A
This
is
a
destructive
operation
and
yeah
like
I,
said,
take
a
take
the
take
the
time
off,
because
if
they
keep
working,
it
is
possible
to
take
those
new
commits
that
they
were
doing
on
the
old,
large
git
repository
and
patch
those
onto
the
new
fixed
one.
But
it's
probably
easier
to
just
have
them
hold
off
for
a
day
or
so
otherwise,
you'll
be
dealing
with
all
sorts
of
issues,
otherwise
so
yeah
we're
going
to
start
by
removing
those
big
old,
build
artifacts
that
we
found
in
there.
A
We'll
take
a
quick
look
here
at
the
first
steps
that
we're
going
to
take,
and
so
first
we're
going
to
take
and
see
how
big
repository
is
with
since
we're
not
doing
any
remote
operations.
It's
kind
of
hard
to
demonstrate
how
this
might
be
affecting
your
day-to-day
work
by
slowing
down
your
commits,
pulls
and
push
pushes,
but
I
think
I
think
just
the
illustration
that
we
can't
interact
with
this
repository
on
github
comm
at
a
conference.
It's
kind
of
a
sign
that
you
know
there's
something
wrong
here.
A
It's
too
large
to
deal
with,
or
what
have
you
so
we're
going
to
take
a
look
and
see
how
big
it
is
and
then
we're
going
to
make
a
new
commit
that
deletes
those
build
files
from
our
repository
and
a
lot
of
you
may
be
like
hey
Kyle,
that
doesn't
actually
reduce
my
repository
size
because
they're
all
in
might
get
history,
and
that
is
correct.
We're
going
to
be
dealing
with
that
with
the
get
the
BFG
repo,
cleaner
and
BFG.
A
Has
this
failsafe
built
into
it
that
if
you
do
not
delete
the
files
ahead
of
time,
it
will
leave
them
in
your
master
branch
as
a
fail-safe?
It
wants
it
to
be
proactive
and
have
a
commit
that
deletes
those
files
first,
just
to
make
sure
that
you
do
that,
it's
very
destructive
just
to
make
sure
you're
doing
exactly
what
you
want
to
do
so
we'll
be
adding
that
commit
to
remove
those
files
and
just
because
I
good
at
cheating.
A
And
pull
that
up
all
right.
So
if
we
take
a
look
at
the
size
of
this
repository,
do
you
Sh
takes
directory
and
gets
you
the
recursive
total
file
size
of
that
directory?
The
docket
directory
is
where
all
your
objects
are
actually
stored.
So
this
will
give
us
a
good
idea
of
what
they
get
repo
size
is
on
disk
both
on
your
remote
and
for
new
clones.
So
if
we
take
a
look
at
that,
doesn't
show
up
on
my
screen,
but
it
does
show
up
on
yours.
A
A
You
can
even
see
that
that
commit
took
a
few
seconds
there,
but
so
now
that
we
have
those
files
deleted,
we're
going
to
push
that
commit
back
up
to
our
origin,
and
just
do
that.
First,
there
we
go
and
it
did
go
pretty
quick,
as
you
can
see
it's
cloning
or
pushing
right
up
to
a
local
directory
here.
So
it's
all
on
disk
all
pretty
fast
operations
so
far,
also
pretty
convenient
for
giving
a
talk
about
repositories
that
run
slowly
because
I
don't
have
enough
jokes
to
entertain
you.
A
While
we
push
things
so
yeah
going
back
into
presentation
here,
we've
deleted
the
files.
What
are
we
going
to
do
next?
We're
going
to
make
a
new
clone
of
the
repository?
We
could
do
a
mirror
clone.
This
only
pulls
down.
They
get
data.
There
is
no
working
directory
and
I'll
show
you
what
that
looks
like
if
you're
not
familiar
in
just
a
moment.
A
We're
then,
going
to
use
the
BFG
utility
to
delete
files
matching
the
war
filename
extension,
and
this
will
go
through
and
delete
them
all
the
way
back
through
you're
history.
So,
even
if
there
are
multiple
revisions
of
these
files,
it'll
go
back
to
the
beginning
of
time
as
if
you
had
never
committed
these
files
into
your
get
repository
in
the
first
place
and.
A
A
Our
fresh
mirror
clone
there
and
we're
going
to
run
the
BFG
utility
from
outside
of
the
directory
at
first
and
tell
it
to
point
right
into
there.
So
this
operation
is
going
to
go
through
those
files
from
history.
It
gives
you
a
little
bit
of
a
report
here,
but,
as
you
can
see,
it
is
also
generated
this
repo
nine-one-one
get
BFG
report.
If
you
can
see
that
on
the
bottom
right
in
sexual
do
that
and
in
that
directory,
there's
more
details
as
to
which
files
were
deleted,
which
were
mapped
and
I'm.
A
Sorry,
not
files,
but
get
objects
were
deleted
there.
So,
if
you're
going
through
an
auditing,
you
need
to
present
something
back
or
just
keep
good
track
of
what
you've
done.
There's
some
very
good,
useful
information
in
there
and
we'll
CD
into
that
repository
and
I
told
you
that
I
would
show
you
what
this
looks
like
if
you
hadn't
seen
it
before
inside
here
we
have
essentially
the
contents
of
what
that
dot
get
directory
would
be.
A
A
All
right,
everybody's
going
to
giggle
I
think
because
this
didn't
work
right
earlier
and
then
I'm
going
to
do
something
that
some
people
might
frown
on
me
for.
Oh
no
word,
okay,
perfectly
fine
cool,
so
we
have
reduced
our
repository
from
nine
hundred
something
megabytes
down
to
eleven
megabytes,
making
this
much
easier
to
push
and
pull
and
clone
and
and
just
deal
with
overall.
A
So,
in
order
to
send
these
changes
back
up
to
our
remote,
we
can
simply
run
git
push
little
disclaimer
here
when
run,
get
push
from
a
mirror
clone.
It
will
automatically
push
it
to
all
of
the
remote
branches
and
it
will
force
push
as
well.
So
there's
no
need
to
designate
that
when
pushing
backup.
So
it
is
going
to
overwrite
the
changes
on
our
remote
here
and
you
can
see
that
happening
towards
the
bottom,
where
it
says,
we've
force
updated
both
master
and
this
release
branch
here
that
would
that
we've
created.
B
A
B
A
All
right
so
we're
in
there
we
run
now
less.
We
no
longer
see
that
build
directory,
it
has
been
removed
and
if
we
run
get
blog
and
we
try
to
grab
one
of
those
commits
that
created
the
build
artifact
see
that
there
I'm
sorry
just
to
kind
of
point
out
these
are
these
automated
commits
that
we
had
earlier
creating
these
build
artifacts.
You
can
see
the
messages
down
there.
The
commits
still
exist,
but
if
all
goes
well,
we
should
see
that
nothing
is.
Nothing
has
been
introduced
here
in
this.
In
these
changes.
A
Has
gone
back
to
the
history
completely
removed
those
files,
so
we
got
those
war
files
out
of
the
way,
and
that
was
probably
the
big
majority
of
it.
So
what
are
we
going
to
do?
Next?
We're
going
to
take
a
look
at
using
the
BFG
repo
cleaner
to
take
our
assets,
file
to
image,
dot
PSD
and
we're
going
to
add
that
in
to
get
LFS
again
this
this
specific
assets
file,
we
can
take
a
look
in.
A
A
second
has
two
revisions,
which
means
both
by
full
binary
files
are
saved
in
our
get
index,
essentially
doubling
the
size
of
that
object
in
our
git
repository
so
get
if
we
were
to
add
that
file
to
LFS
now
future
iterations
of
it
would
be
tracked
by
LFS.
However,
without
using
something
like
the
BFG
repo
cleaner,
all
those
past
objects
would
still
be
in
your
get
index.
A
And
essentially,
what
we're
going
to
do
here
is
I'm
going
to
grab
a
brand
new
mirror.
Actually
we
don't
even
need
to
do
that.
We
can
use
the
one
that
we
already
have
we're
going
to
skip
those
first,
two
steps:
I
just
bought
you
back
30
seconds
of
your
life
and
then
we're
going
to
use
the
BFG
rifo
cleaner.
It
has
this
flag
here
called
convert
to
get
LFS.
A
This
no
blob
protection
flag
is
one
that
you
can
use
for
deleting
files,
but
essentially
remember
when
we
said
we
have
to
delete
the
files
before
we
before
we
try
to
I'm
sorry
delete
the
files
with
a
commit
before
we
use
the
BFG
repo
cleaner.
The
note
blob
protection
essentially
takes
off
that
safeguard
because
we
don't
want
to
delete
the
file,
but
we
do
want
to
replace
it
with
the
LFS
version.
A
Once
we've
done
that
and
we've
given
BFG
that
designation
we're
going
to
go
into
the
repository
and
install
git
LFS
into
it
and
then
we'll
verify
that
that
worked
by
running
the
git
LFS
LS
files
that'll
tell
us
what
files
are
now
tracked
by
LFS
beef
because
we're
doing
a
local
clone
here.
I
can't
actually
demonstrate
it
pushing
or
pulling
LFS
files
in
any
sort
of
reliable
manner.
But
there
may
be
I
just
wasn't
able
to
figure
that
out.
A
A
A
There
we
go
and
much
like
we
did
with
our
deletion.
Here
we
do
get.
A
report
kicked
out
for
us.
You'll
see
that
it's
made
a
new
directory
online
local
here
reporting
everything
that
was
added
to
LSS.
You
have
a
record
of
everything
and
it's
pulled
that
file
out
started
tracking
it
with
LFS
and
replaced
it
with
a
pointer
file
for
LSS
to
use.
A
A
So
kind
of
getting
towards
the
end
of
our
process
here.
The
last
thing
we
want
to
do
is
clean
up
those
commit
messages.
You
know
we
had
that
confidential
data
descriptor
at
the
bottom.
There
you
may
have
that
from
some
sort
of
automated
commit
process.
You
may
in
the
past,
have
used
JIRA
and
put
JIRA
tickets
into
your
commit
messages
and
now
you've
switch
to
something
else
and
we're
like.
A
We
don't
need
that
in
our
commit
messages
anymore,
you
may
have
used
a
tool
like
SVN
to
get
or
I'm
sorry
get
SVN
to
come
from
subversion
and
you
get
those
little
SVN
or
get
SBN
ID
comments
at
the
bottom
of
the
commit
messages
you
may
want
to
prune
those
out.
There's
there's
a
whole
bunch
of
various
reasons
why
you
might
run
into
these.
A
A
This
set
command,
essentially
a
regular
expression
replace
we're
going
to
put
in
the
text
for
that
confidential,
quoting
information
into
there
and
we're
going
to
replace
it
with
nothing,
essentially
just
trimming
it
out
and
the
all
flag,
if
I'm
not
mistaken,
tells
us
to
go
across
all
the
branches.
If
you
really
want
to
know
why
I'm
not
entirely
sure,
because
I
did
find
this
on
Stack
Overflow,
which
I'm
was
quickly
becoming
famous
for
I,
think
so.
Yeah
we'll
run
that
last
little
bit
here.
A
Here
we
are,
and
so
will
swaps
that
right
in
you
can
see
I've
already
pre-prepared
the
exact
command
that
we
would
need
to
remove
that
little
disclaimer
at
the
bottom
two
commits
actually
before
we
run
this
I'll
run
a
quick
get
log,
as
we
can
see
that
again.
So
if
it
looks
like
we
have
other
stuff
in
there
too
from
and
that
would
have
been
good
to
include
in
this.
A
Okay,
but
we
still
do
have
our
commit,
contains
strictly
confidential
coding
information
and
we
could
use.
In
fact,
we
can
probably
just
do
this.
You
know
live.
Why
not
and
remove
those
former
commit
IDs
from
there
if
we
would
like
and
we'll
clean
up
these
commit
messages
here,
making
them
a
little
bit
neater
a
little
bit
more
informative.
So
let's
run
this
first
one.
A
So
now
is
something
totally
unplanned
and
newly
discovered.
Why
don't
we
try
to
take
this
out
of
here,
because
this
doesn't
look
like
any
fun,
it's
probably
useful
for
somebody,
but
for
the
sake
of
taking
risks
and
chances,
we
will
go
right
in
here,
and
so
that's
why
you
do
this
Oh
Oh
golly
just
leave
that
right
out.
A
A
How
are
we
doing
doing
good
so
far?
You
know
when
I
was
doing
services,
engineering
and
I
worked
with
customers
directly.
Very
often
we
don't
actually
ever
touch
keyboards
as
part
of
our
agreement.
We
just
kind
of
coach
people
through
running
commands,
so
I'd
like
to
tell
people
that
my
job
was
being
a
backseat
typist
and
you'd
catch
people
all
the
time,
we'd
start
to
feel
terrible
after
a
while
I'm
like
I
spelled
that
wrong
I.
Did
it
a
hectare
earlier
in
a
talk,
it's
just
like
habit
now
this
looks
like
it'll
work
right.
A
A
Yeah-
and
you
could
do
this
to
do
the
opposite
sort
of
thing-
you
know
you,
could
you
go
and
put
stuff
into
your
commit
messages,
but
that's
so
fun
all
right.
So
now
we
have
this
nice
clean
repository,
we've
taken
our
assets,
we've
put
those
in
to
get
LFS
we've
taken
our
large
build
files.
We've
moved
those
out
of
the
repository
entirely
in
case
you're,
curious
like
where
should
those
live,
those
to
be
saved
on
some
sort
of
artifact
server,
either
blob
storage
completely
separate,
don't
commit
your
heart
effects
in
to
get
and
yeah.
A
A
A
They
would
have
to
force
push
back
up
in
order
to
put
back
up
that
mismatched
commit
history
I
if
you're
using
github
with
you
can
disable
force,
pushing
I
think
other
get
products.
Allow
you
to
do
that
as
well,
so
you
can
prevent
them
from
just
undoing
everything
that
you
just
did
and
so,
but
yeah
there's.
Definitely
a
you
know
a
process.
A
You
would
want
to
go
through
of
making
sure
that
everybody's
aware
of
what
the
downtime
is
for
and
give
you
know,
give
out
instructions
and
how
to
switch
to
the
new
remote
make
a
fresh
clone.
It
should
take
them
minimal
time.
You
know,
since
you're
cloning
down
a
much
smaller
repository
versus
a
giant
one
gig
by
end
saying
the
one
gig
repository
reminds
me:
the
one
gigabyte
is
the
maximum
for
github.com
I.
Think
the
largest
I've
seen
actually
working
with
a
customer
I'll
get
a
better
prize
which
they
can
set.