►
From YouTube: FE Skillsharing: Reviewing Merge Request diffs locally
Description
Here's a snippet for the `git review-mb` alias:
- https://gitlab.com/gitlab-org/gitlab/snippets/1936414
B
A
So
I'm
excited
to
share
this.
That
I
just
started:
I
created
a
script
locally
to
help
me
set
the
sound,
and
it's
been
really
really
helpful,
as
if
I
don't
have
my
notifications
to
say,
let's
see
what
happens
but
yeah.
Here's
an
example
like
here
like
a
lot
of
these
lines,
are
the
same.
We're
just
wrapping
this
in
an
if
when
you
read
it,
it
looks
like
this
there's
a
big
change,
so
this
significantly
affects
the
readability
of
tips.
When
you
do
encode
a
few,
it's
really
tough.
You
can
locally
it's
easy
to
find.
A
But
when
you
have
a
multi
commit
Amaury
viewing
the
diffs
locally
can
be
a
bit
of
a
challenge,
but
thankfully
it's
not
impossible
with
a
little
bit
of
get
Jitsu
and
I'm
gonna
share
we're
gonna
create
a
snippet
that
shares
the
alias
between
all
this,
but
I'm
gonna
show
Justin
what
I've
been
doing
locally,
and
it's
been
really
nice
so
I'm
over
here.
In
my
overview,
I'm
gonna
copy
this
branch
and
I
open
my
vias
code
editor.
A
B
A
Here's
the
alias
that
I've
made
we're
gonna
we're
gonna
unpack
the
magic
in
a
little
bit,
but
I
have
one
I
call
it
review
mb4
merge
base.
So
whenever
I'm
reviewing
stuff
I
run
this
alias-
and
this
is
what
happens,
it
takes
all
of
the
changes
of
the
EMR
and
puts
them
into
staged.
So
then
I
can
just
click
on
one
and
I
can
see
a
much
prettier
diff
of
things
that
are
going
on,
so
the
alias
that
I
called
it
was
reviewing
the
MB
for
merge
base,
but
what
it
actually
does
is
it
creates.
A
This
revert
commit
by
applying
the
diff
from
the
merge
base
to
the
head
but
backwards,
and
then
it
reverts
this
revert
commit
without
committing.
So
this
is
the
revert
of
the
entire
mr
changes
and
then
it
revert.
Stat
revert
without
committing
so
I
can
see
all
of
it
and
staged
in
a
nice
way.
I
don't
know
if
they.
You
think
this
would
be
helpful
Justin
if
this
answers
your
question,
but
this
is
my
process
for
it
sure
yeah.
So
this
is
the
kind
of
thing
you
were
looking
for.
I.
A
A
So,
no
matter
so
let
me
let's
unpack
the
alias
a
little
bit
and
then
here's
all
my
different
aliases.
Hopefully
there's
no
secrets
here,
but
here
here's
what's
going
on
is
it.
It
takes
the
diff
from
the
head
to
the
merge
base,
but
it's
going
backwards
and
then
it
applies
that
dis
and
it
creates
this
revert
commit
so
that
takes
all
of
the
changes
and
packs
them
into
one
commit
but
backwards.
A
Okay
and
then
it
does
a
revert
of
that
revert
without
committing
so
I
have
everything
it's
staged,
and
so,
when
I
create
patches
or
something
on
top
of
this
I
can
go
ahead
and
just
commit
this
and
then
I'll
create
more
patch
commits
and
I'll
share
those
with
others
so
like.
If
I
saw
something
in
this
file
they're
like
oh,
we
really
should
do
it.
We
should
do
it
like
this
before
I.
Send
this
over
or
I
guess
I
could
save
it
before
I.
A
Send
this
over
I'll
go
ahead
and
okay,
let
me
just
stage
this
revert,
revert
and
then
I'll
go
ahead
and
make
new
commits
on
top
of
that
and
share
those
commits
as
patches.
So,
oh
I
don't
push
anything
up.
If
you
start
this
thing
have
to
watch
out
for
is
this,
creates
a
new
commit,
so
don't
just
push
it
up
whatever
is
going
on,
but
yeah
then
I'll
then
I'll
create
a
patch
from
this
and
for
the
sake
of
completeness
I'll,
go
ahead
and
walk
through
that.
A
A
I
use
to
review
code
is
one
that
scripts
to
package
everything
into
one
diff
like
that,
and
then
this
one
that
helps
format
patches
now,
while
we're
here
on
the
call,
let's
make
it
a
productive
poem
and,
let's
add
a
snippet
for
this
review
base
thing
over
here
in
our
snippets,
create
a
new
snippet.
The
title
hard.
A
Bilious
there
you
go
and
there's
probably
a
lot
of
improvement
that
could
be
had
to
here.
It
takes
an
argument
if
you
wanted
to
have
this
look
at
a
different
branch
as
for
them
comparing
the
merge
base,
so
you
can
add
that
it's
already
commit,
but
I
don't
think
I've
ever
used
this
argument
other
than
just
using
whatever
origin
master
in
you.
So,
let's
see
if
creating
a
snippet
worked.
A
Yeah
had
that
alias
for
it
good
cool,
alright,
I'm,
gonna,
stop,
sharing
and
stop
recording
and
tell
me
how
you
really
feel
Justin.