git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: How do you undo an add

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Nov 18, 2024, 23:20 UTC
Message-ID
<022f01db3a10$7fe28140$7fa783c0$@nexbridge.com>
In-Reply-To
<MBCJkxhVnx5AhlKkq15aTn5FYI6cG-wdqqwQ84mVH9zjf-YehSrRWPgd-UwdTMrYhS2Sgofbyn2bS7iMlANyyYf_Z6b6_e3FH0hRm5VYciU=@proton.me>
On November 18, 2024 5:10 PM, A bughunter wrote:
Show 13 quoted lines
>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.

Prior to push, before commit, you can use reset HEAD.

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

If I did not understand your situation, I apologize.
Show 22 quoted lines
>I suspect the answer is: "you can't - git provides no means to do so" - a defect, bug
>as we call it. The answer to this use-case question likely will confirm my bugreport
>and I get the feeling this is why they will not answer the question they do not want
>to accept my bugreport and have a bad spirit to argue. The excuses they give for this
>will be that it is not typical: This can normally be solved by repushing. However it is
>still a defect and in my use-case there is a slow or intermittent connection and no
>sha-backups yet because this is the initial creation of a repo.
>
>The above question is a use-case[C] seeking how to undo without deleting files.
>There shouldn't be any need to know a use-case in order to answer a technical
>question. I am open to discuss my use-case on this thread. The use-case if of this
>repo github.com/freedom-foundation/kjbible
>
>My original bug report is that the user " may be cornered into delete files"
>bugreport[A] Summary as of 20241117 brian does not believe it's a bug and begins
>chattering to Peff about how to fix the bug "There are Git-level keepalives during the
>similar compression operation".
>
>The full question[B] which is a child of the bugreport[A] is here. Summary as of
>20241117 my question was mostly sidestepped and spammed whilst the thread
>devolved into a political drama about code_of_conduct. I am not open to discuss
>my use-case on this thread.
Previous: A bughunterNext: Kristoffer Haugsbakk
Message 3 of 11 in “How do you undo an add”
  1. A bughunterNov 17, 2024
  2. A bughunterNov 18, 2024
  3. rsbecker@nexbridge.comNov 18, 2024
  4. Kristoffer HaugsbakkNov 19, 2024
  5. A bughunterNov 19, 2024
  6. A bughunterNov 19, 2024
  7. rsbecker@nexbridge.comNov 19, 2024
  8. Konstantin RyabitsevNov 20, 2024
  9. A bughunterNov 20, 2024
  10. A bughunterDec 5, 2024
  11. A bughunterNov 19, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.