public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Gaius Mulley <gaiusmod2@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: 1-800-GIT-HELP (how to delete a user branch?)
Date: Tue, 25 Oct 2022 14:09:17 +0100	[thread overview]
Message-ID: <CAH6eHdQB_MVgC6=s=6URdm-fS0jDJ0Mprgd3=JgOnxz+4TMVPg@mail.gmail.com> (raw)
In-Reply-To: <8735bcjdpc.fsf@debian>

On Tue, 25 Oct 2022 at 13:23, Gaius Mulley via Gcc <gcc@gcc.gnu.org> wrote:
>
>
> Just wondering what is the safest way to delete a user branch?
>
> [I used ./contrib/git-add-user-branch.sh and wanted to start over
>  (user branch for m2 and gcc12)],

When you say start over, do you mean reuse the same branch name for a
different branch with unrelated history, but using the same name?

If yes, you can just force push the new history to the branch. That's
the simplest answer.

If you really want to delete the branch, then you just say:

git push --dry-run --delete REMOTE BRANCH
and if that looks right, remove the --dry-run option.

The REMOTE will be something like users/gaius and BRANCH will be
something like refs/users/gaius/heads/m2gcc12 depending on how you set
up your local user branches.

  reply	other threads:[~2022-10-25 13:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 12:21 Gaius Mulley
2022-10-25 13:09 ` Jonathan Wakely [this message]
2022-10-25 13:15   ` Gaius Mulley

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='CAH6eHdQB_MVgC6=s=6URdm-fS0jDJ0Mprgd3=JgOnxz+4TMVPg@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gaiusmod2@gmail.com \
    --cc=gcc@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).