Git development
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: rsbecker <rsbecker@nexbridge.com>,
	"A bughunter" <A_bughunter@proton.me>,
	git@vger.kernel.org
Subject: Re: How do you undo an add
Date: Tue, 19 Nov 2024 09:13:38 +0100	[thread overview]
Message-ID: <271da43e-22d8-4f67-952e-72d2af8f6b1b@app.fastmail.com> (raw)
In-Reply-To: <022f01db3a10$7fe28140$7fa783c0$@nexbridge.com>

On Tue, Nov 19, 2024, at 00:20, rsbecker@nexbridge.com wrote:
> On November 18, 2024 5:10 PM, A bughunter wrote:
>>BROAD OVERVIEW
>>
>>bugreport[A], question[B] and use-case[C]. These are all related but separate
>>threads for the purposes as labled. Please do not cross-post or cross-quote. Focus
>>on productivity and solving these. You are welcomed to view and participate in all of
>>these as I contribute more.
>>
>>use-case[C] - git question (short) rephrase with use-case added.
>>
>>ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's
>>already been commit : push failed. Failed pushes piled up. I need them untracked.
>>How do you undo an add ( many adds): simple question. Without deleting any files,
>>to repush 1 by 1.
>
> Once you have pushed an added file, your only option is filter-branch
> to prune out the
> invalid content.

git-filter-branch? Why not `git reset --hard` with `push --force-with-lease
--force-if-includes`? Maybe I’m missing something.

> Following a commit, you can use reset --HARD to move the branch head back to a
> Commit where the add did not happen.

Yeah exactly.

-- 
Kristoffer Haugsbakk



  reply	other threads:[~2024-11-19  8:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 11:24 How do you undo an add A bughunter
2024-11-18 22:09 ` A bughunter
2024-11-18 23:20   ` rsbecker
2024-11-19  8:13     ` Kristoffer Haugsbakk [this message]
     [not found]       ` <89DnJJL6nbYjQW9N8CtejlqbnzPDiH7iKd-3zKFY8oQezk1rRYbjH5WkKdrVPYPQQsKPhMpd3IcBet7ZBD4U3HSSoXk6rVXIMWPaG4hAj1g=@proton.me>
2024-11-19 20:49         ` A bughunter
2024-11-19 19:54     ` A bughunter
2024-11-19 20:58     ` A bughunter
2024-11-19 21:31       ` rsbecker
2024-11-20  0:02       ` Konstantin Ryabitsev
2024-11-20 20:01 ` A bughunter
2024-12-05 21:03   ` A bughunter

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=271da43e-22d8-4f67-952e-72d2af8f6b1b@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=A_bughunter@proton.me \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    /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