Re: Backing out port update that may have broken VirtualBox

From: Kevin Oberman <rkoberman_at_gmail.com>
Date: Sat, 22 Oct 2022 17:52:09 UTC
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