Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2022 10:52:09 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        "Steve O'Hara-Smith" <steve@sohara.org>
Cc:        "freebsd-questions@freebsd.org" <questions@freebsd.org>
Subject:   Re: Backing out port update that may have broken VirtualBox
Message-ID:  <CAN6yY1taRO2PXPdLX7EROmuzgMfOBO1DKrRUPJDHmxBnqV1AkA@mail.gmail.com>
In-Reply-To: <20221022183147.a112a82ea47d05c24e6f59f9@sohara.org>
References:  <CAN6yY1vYCQnMaNPkUgq-hqFYrUcJm6i2VdNrB5EWrai22ogYXw@mail.gmail.com> <CAN6yY1uWXAa4FufexA6kj2zjvs%2BikUxZe4shZMrUYxjmRkfmhA@mail.gmail.com> <20221022183147.a112a82ea47d05c24e6f59f9@sohara.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000097a68d05eba338a4
Content-Type: text/plain; charset="UTF-8"

Thanks! Never thought of branching.

On Sat, Oct 22, 2022 at 10:31 AM Steve O'Hara-Smith <steve@sohara.org>
wrote:

> On Sat, 22 Oct 2022 09:50:16 -0700
> Kevin Oberman <rkoberman@gmail.com> wrote:
>
> > I'd still like to know how to revert a commit locally, though.
>
>         With git branches are dirt cheap - so create a branch, then use git
> log to find the hash of the commit you want to revert and git revert to
> back it out (there's an easier way if it's the latest commit but this is
> general). Git revert creates a new commit with the diff reversed and
> provides a mechanism to deal with conflicts if things have changed too
> much.
>
>         It's usually best practice with git to leave the upstream branches
> pristine and keep them up to date with upstream while doing all local work
> on branches. This makes it easy to work on multiple independent things at
> once.
>
>         Use git rebase <upstream branch> to update your working branch
> with upstream changes - it's way easier on the brain cells than using
> merge.
>
> --
> Steve O'Hara-Smith <steve@sohara.org>
>


-- 
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

--00000000000097a68d05eba338a4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:tahoma,s=
ans-serif;font-size:small">Thanks! Never thought of branching.<br></div></d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On =
Sat, Oct 22, 2022 at 10:31 AM Steve O&#39;Hara-Smith &lt;<a href=3D"mailto:=
steve@sohara.org">steve@sohara.org</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">On Sat, 22 Oct 2022 09:50:16 -0700<br>
Kevin Oberman &lt;<a href=3D"mailto:rkoberman@gmail.com" target=3D"_blank">=
rkoberman@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I&#39;d still like to know how to revert a commit locally, though.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 With git branches are dirt cheap - so create a =
branch, then use git<br>
log to find the hash of the commit you want to revert and git revert to<br>
back it out (there&#39;s an easier way if it&#39;s the latest commit but th=
is is<br>
general). Git revert creates a new commit with the diff reversed and<br>
provides a mechanism to deal with conflicts if things have changed too much=
.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 It&#39;s usually best practice with git to leav=
e the upstream branches<br>
pristine and keep them up to date with upstream while doing all local work<=
br>
on branches. This makes it easy to work on multiple independent things at<b=
r>
once.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Use git rebase &lt;upstream branch&gt; to updat=
e your working branch<br>
with upstream changes - it&#39;s way easier on the brain cells than using m=
erge.<br>
<br>
-- <br>
Steve O&#39;Hara-Smith &lt;<a href=3D"mailto:steve@sohara.org" target=3D"_b=
lank">steve@sohara.org</a>&gt;<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr=
"><div><div dir=3D"ltr">Kevin Oberman, Part time kid herder and retired Net=
work Engineer<br>E-mail: <a href=3D"mailto:rkoberman@gmail.com" target=3D"_=
blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerprint: D03FB98AFA78E=
3B78C1694B318AB39EF1B055683</div></div></div></div></div></div></div></div>

--00000000000097a68d05eba338a4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1taRO2PXPdLX7EROmuzgMfOBO1DKrRUPJDHmxBnqV1AkA>