Re: Backing out port update that may have broken VirtualBox

From: Steve O'Hara-Smith <steve_at_sohara.org>
Date: Sat, 22 Oct 2022 17:31:47 UTC
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>