9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Jacob Moody <moody@posixcafe.org>
To: 9front@9front.org
Subject: Re: [9front] git equivalent of git reset --hard <commit>
Date: Thu, 12 Dec 2024 10:17:42 -0600	[thread overview]
Message-ID: <63430aec-13f9-41df-a3f5-02e7f92df6ad@posixcafe.org> (raw)
In-Reply-To: <CAP6exYJtUwReSRoJbK71=JkSORrLtWt1oTsk2Y6E+o3oo-17zg@mail.gmail.com>

On 12/12/24 10:00, ron minnich wrote:
> not quite sure how to do this, but I'd like to reset a branch I am on to a certain commit. 
> 
> Any hints?

We use git/branch for this, -b picks a commit as the new "base" and -n will overwrite an existing
branch with the same name so you'd do something like:

git/branch -nb <commit to revert to> <branch name>


Thanks,
moody


      reply	other threads:[~2024-12-12 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 16:00 ron minnich
2024-12-12 16:17 ` Jacob Moody [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63430aec-13f9-41df-a3f5-02e7f92df6ad@posixcafe.org \
    --to=moody@posixcafe.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).