Re: How do you undo an add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 19, 2024, at 00:20, rsbecker@xxxxxxxxxxxxx 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







[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux