{"thread":{"id":"62507","subject":"How do you undo an add","startedAt":"2024-11-17T11:24:24Z","lastAt":"2024-12-05T21:03:44Z","messageCount":11,"participants":["A bughunter","rsbecker@nexbridge.com","Kristoffer Haugsbakk","Konstantin Ryabitsev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"507436","messageId":"4hiTc8Kx5yNhYuN8abv3QFJBuptM6VWZ9OKvkdZFlSI5y0zoK-lN_VHf-QCSEjllmSWvu9V-tbrvFOx17_P0Nq8UKxEcK3Rs2d02FjbYuUc=@proton.me","threadId":"62507","inReplyTo":null,"subject":"How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-17T11:24:10Z","receivedAt":"2024-11-17T11:24:24Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nMaybe if I ask a queation a different way? What is the problem?\nADD, 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.\n\n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc50lcJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAAtSAQCoWAIHvKlg90Ehervf3zZtd1Ls65ZW0yMZ8ms6LgKClwEAn8lO\n6WSjvf58MofXRnDD88ciYBQBqfbs3v//kOiIYgA=\n=O0ks\n-----END PGP SIGNATURE-----\n"},{"id":"507545","messageId":"MBCJkxhVnx5AhlKkq15aTn5FYI6cG-wdqqwQ84mVH9zjf-YehSrRWPgd-UwdTMrYhS2Sgofbyn2bS7iMlANyyYf_Z6b6_e3FH0hRm5VYciU=@proton.me","threadId":"62507","inReplyTo":"4hiTc8Kx5yNhYuN8abv3QFJBuptM6VWZ9OKvkdZFlSI5y0zoK-lN_VHf-QCSEjllmSWvu9V-tbrvFOx17_P0Nq8UKxEcK3Rs2d02FjbYuUc=@proton.me","subject":"Re: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-18T22:09:45Z","receivedAt":"2024-11-18T22:09:50Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nBROAD OVERVIEW\n\nbugreport[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.\n\nuse-case[C] - git question (short) rephrase with use-case added.\n\nADD, 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.\n\nI 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. \n\nThe 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\n\nMy 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\".\n\nThe 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.\n\n\n[A]: https://lore.kernel.org/git/20241115093214.GA1749331@coredump.intra.peff.net/#r\n\n[B]: https://lore.kernel.org/git/xmqqr079xty7.fsf@gitster.g/T/#t\n\n[C]: https://lore.kernel.org/all/4hiTc8Kx5yNhYuN8abv3QFJBuptM6VWZ9OKvkdZFlSI5y0zoK-lN_VHf-QCSEjllmSWvu9V-tbrvFOx17_P0Nq8UKxEcK3Rs2d02FjbYuUc=@proton.me/#r\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc7uycJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAAUrAQDMBzGR0iQAyWfP3whiWEph0CyU+Yoveqk3jmFe7o1GMgEAm+6P\nfa5TtaggX7+jcAWmRh7NvUWl6H9qFlCdxSflEQY=\n=EHWY\n-----END PGP SIGNATURE-----\n"},{"id":"507550","messageId":"022f01db3a10$7fe28140$7fa783c0$@nexbridge.com","threadId":"62507","inReplyTo":"MBCJkxhVnx5AhlKkq15aTn5FYI6cG-wdqqwQ84mVH9zjf-YehSrRWPgd-UwdTMrYhS2Sgofbyn2bS7iMlANyyYf_Z6b6_e3FH0hRm5VYciU=@proton.me","subject":"RE: How do you undo an add","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2024-11-18T23:20:41Z","receivedAt":"2024-11-18T23:21:02Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On November 18, 2024 5:10 PM, A bughunter wrote:\n>BROAD OVERVIEW\n>\n>bugreport[A], question[B] and use-case[C]. These are all related but separate\n>threads for the purposes as labled. Please do not cross-post or cross-quote. Focus\n>on productivity and solving these. You are welcomed to view and participate in all of\n>these as I contribute more.\n>\n>use-case[C] - git question (short) rephrase with use-case added.\n>\n>ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's\n>already been commit : push failed. Failed pushes piled up. I need them untracked.\n>How do you undo an add ( many adds): simple question. Without deleting any files,\n>to repush 1 by 1.\n\nOnce you have pushed an added file, your only option is filter-branch to prune out the\ninvalid content.\n\nPrior to push, before commit, you can use reset HEAD.\n\nFollowing a commit, you can use reset --HARD to move the branch head back to a\nCommit where the add did not happen.\n\nIf I did not understand your situation, I apologize.\n\n>I suspect the answer is: \"you can't - git provides no means to do so\" - a defect, bug\n>as we call it. The answer to this use-case question likely will confirm my bugreport\n>and I get the feeling this is why they will not answer the question they do not want\n>to accept my bugreport and have a bad spirit to argue. The excuses they give for this\n>will be that it is not typical: This can normally be solved by repushing. However it is\n>still a defect and in my use-case there is a slow or intermittent connection and no\n>sha-backups yet because this is the initial creation of a repo.\n>\n>The above question is a use-case[C] seeking how to undo without deleting files.\n>There shouldn't be any need to know a use-case in order to answer a technical\n>question. I am open to discuss my use-case on this thread. The use-case if of this\n>repo github.com/freedom-foundation/kjbible\n>\n>My original bug report is that the user \" may be cornered into delete files\"\n>bugreport[A] Summary as of 20241117 brian does not believe it's a bug and begins\n>chattering to Peff about how to fix the bug \"There are Git-level keepalives during the\n>similar compression operation\".\n>\n>The full question[B] which is a child of the bugreport[A] is here. Summary as of\n>20241117 my question was mostly sidestepped and spammed whilst the thread\n>devolved into a political drama about code_of_conduct. I am not open to discuss\n>my use-case on this thread.\n\n\n"},{"id":"507574","messageId":"271da43e-22d8-4f67-952e-72d2af8f6b1b@app.fastmail.com","threadId":"62507","inReplyTo":"022f01db3a10$7fe28140$7fa783c0$@nexbridge.com","subject":"Re: How do you undo an add","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-11-19T08:13:38Z","receivedAt":"2024-11-19T08:14:00Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Nov 19, 2024, at 00:20, rsbecker@nexbridge.com wrote:\n> On November 18, 2024 5:10 PM, A bughunter wrote:\n>>BROAD OVERVIEW\n>>\n>>bugreport[A], question[B] and use-case[C]. These are all related but separate\n>>threads for the purposes as labled. Please do not cross-post or cross-quote. Focus\n>>on productivity and solving these. You are welcomed to view and participate in all of\n>>these as I contribute more.\n>>\n>>use-case[C] - git question (short) rephrase with use-case added.\n>>\n>>ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's\n>>already been commit : push failed. Failed pushes piled up. I need them untracked.\n>>How do you undo an add ( many adds): simple question. Without deleting any files,\n>>to repush 1 by 1.\n>\n> Once you have pushed an added file, your only option is filter-branch\n> to prune out the\n> invalid content.\n\ngit-filter-branch? Why not `git reset --hard` with `push --force-with-lease\n--force-if-includes`? Maybe I’m missing something.\n\n> Following a commit, you can use reset --HARD to move the branch head back to a\n> Commit where the add did not happen.\n\nYeah exactly.\n\n-- \nKristoffer Haugsbakk\n\n\n"},{"id":"507640","messageId":"ntVGkqDvxpzqdRU8m59c7JnXVKTTM_KY1zbMOsxBX9l1sPYeAArSdod3cNaRYLavceX-XjsU8pIM3-qFHW2GJQbs-t-RbJ-2fL7mrGl4tMY=@proton.me","threadId":"62507","inReplyTo":"022f01db3a10$7fe28140$7fa783c0$@nexbridge.com","subject":"RE: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-19T19:54:38Z","receivedAt":"2024-11-19T19:54:58Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nOn Monday, November 18th, 2024 at 17:20, rsbecker@nexbridge.com <rsbecker@nexbridge.com> wrote:\n\n> On November 18, 2024 5:10 PM, A bughunter wrote:\n> \n> > BROAD OVERVIEW\n> > \n> > bugreport[A], question[B] and use-case[C]. These are all related but separate\n> > threads for the purposes as labled. Please do not cross-post or cross-quote. Focus\n> > on productivity and solving these. You are welcomed to view and participate in all of\n> > these as I contribute more.\nI appreciate your understanding.\n\n> > use-case[C] - git question (short) rephrase with use-case added.\n> > \n> > ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's\n> > already been commit : push failed. Failed pushes piled up. I need them untracked.\n> > How do you undo an add ( many adds): simple question. Without deleting any files,\n> > to repush 1 by 1.\n> \n> \n> Once you have pushed an added file, your only option is filter-branch to prune out the\n> invalid content.\nI will look into filter-branch. I will let you, rsbecker,  know if it works for the purposes of displaying the solution to the entire git community. If you have any more relevent specifics about the use of filter-branch you are welcome to post. Just as you form a response, to focus, pin my question in front of you as you write about filter-branch.\n\nThe rest of this slightly peaves me because none of it has to do with the TOPIC my question. \n> Prior to push, before commit, you can use reset HEAD.\n\nThis delete's files and if it is the only option in my given situation it does CONFIRM my bugreport[A].\n> Following a commit, you can use reset --HARD to move the branch head back to a\n> Commit where the add did not happen.\n\nSeek grace.\n> If I did not understand your situation, I apologize.\n> \n> > I suspect the answer is: \"you can't - git provides no means to do so\" - a defect, bug\n> > as we call it. The answer to this use-case question likely will confirm my bugreport\n> > and I get the feeling this is why they will not answer the question they do not want\n> > to accept my bugreport and have a bad spirit to argue. The excuses they give for this\n> > will be that it is not typical: This can normally be solved by repushing. However it is\n> > still a defect and in my use-case there is a slow or intermittent connection and no\n> > sha-backups yet because this is the initial creation of a repo.\n> > \n> > The above question is a use-case[C] seeking how to undo without deleting files.\n> > There shouldn't be any need to know a use-case in order to answer a technical\n> > question. I am open to discuss my use-case on this thread. The use-case if of this\n> > repo github.com/freedom-foundation/kjbible\n> > \n> > My original bug report is that the user \" may be cornered into delete files\"\n> > bugreport[A] Summary as of 20241117 brian does not believe it's a bug and begins\n> > chattering to Peff about how to fix the bug \"There are Git-level keepalives during the\n> > similar compression operation\".\n> > \n> > The full question[B] which is a child of the bugreport[A] is here. Summary as of\n> > 20241117 my question was mostly sidestepped and spammed whilst the thread\n> > devolved into a political drama about code_of_conduct. I am not open to discuss\n> > my use-case on this thread.\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc87P0JkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAPviAP4uP8OEMcmzOHpuCEaByLjVudqKuqPNzI2s/UXBZHNoYwD+Kg3m\nU9IuHANF21RXERRYLiX+mjcQzLEdmov/dpjXOw4=\n=vuRu\n-----END PGP SIGNATURE-----\n"},{"id":"507643","messageId":"gEGJ85bqla-NTL4ZJ1yt-zAAIaIYhp0s7hy3EJNmb5rF08NptfrexXMHZO6p4vZ7i6atRVsB09dlJ2z4hEXtOhH8MlqVpSg_8GlBDn6GiGM=@proton.me","threadId":"62507","inReplyTo":"89DnJJL6nbYjQW9N8CtejlqbnzPDiH7iKd-3zKFY8oQezk1rRYbjH5WkKdrVPYPQQsKPhMpd3IcBet7ZBD4U3HSSoXk6rVXIMWPaG4hAj1g=@proton.me","subject":"Re: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-19T20:49:29Z","receivedAt":"2024-11-19T20:49:40Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nAfter looking into filter-branch here is what I found out. from the docs:\n\nWARNING\ngit filter-branch has a plethora of pitfalls that can produce non-obvious manglings of the intended history rewrite (and can leave you with little time to investigate such problems since it has such abysmal performance). These safety and performance issues cannot be backward compatibly fixed and as such, its use is not recommended. Please use an alternative history filtering tool such as git filter-repo. If you still need to use git filter-branch, please carefully read SAFETY (and PERFORMANCE) to learn about the land mines of filter-branch, and then vigilantly avoid as many of the hazards listed there as reasonably possible. ( https://git-scm.com/docs/git-filter-branch )\n\nSo here a git beginner, myself is cornered into navigating a \"minefield\". Illuminated language that git is full of undocumented known bugs. I see now what this facade of rejecting bugreports is about: it  seem's about the bugreport recievers do dance around the jargon term \"bug\" in favor of various possibly more accurate 'illuminations' however as I have put in plain english a bug is a defect. \n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc8+dYJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAAxwAP9ISjq2ja8Oc+BzmVTd39zFQ7G/fIuqRPvPhEoK9w5uIAD+Jtia\nwSnZYAEkEIPi7wAFU1wBhsgp6eU0Z5OMZhQM0Aw=\n=2LbM\n-----END PGP SIGNATURE-----\n"},{"id":"507645","messageId":"6arLzsCWhxM8QTlPRbNStMLfz5ZqVJTTUSX1E1NXLiy_n_d0v0wFMiUK5brfkqTV3chUOp9OLYyBpIbe4tYQ6qvrLKDzfg5el0EWnqDIYDM=@proton.me","threadId":"62507","inReplyTo":"022f01db3a10$7fe28140$7fa783c0$@nexbridge.com","subject":"RE: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-19T20:58:51Z","receivedAt":"2024-11-19T20:58:57Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nOn Tuesday, November 19th, 2024 at 02:13, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n> On Tue, Nov 19, 2024, at 00:20, rsbecker@nexbridge.com wrote:\n> > On November 18, 2024 5:10 PM, A bughunter wrote: \n> > > ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's\n> > > already been commit : push failed. Failed pushes piled up. I need them untracked.\n> > > How do you undo an add ( many adds): simple question. Without deleting any files,\n> > > to repush 1 by 1.\n> > \n> > Once you have pushed an added file, your only option is filter-branch\n> > to prune out the\n> > invalid content.\n> \n> git-filter-branch? Why not `git reset --hard` with `push --force-with-lease --force-if-includes`? Maybe I’m missing something.\nYes you are missing something \"Without deleting any files,\" a bunch of irrelivent and wrong answers is SPAM because literacy is necessity for participating in any ML. \n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc8/AgJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAGtoAQCghq6jVJrxOy2d3LX80E5gfvBKRSdl/x5UERVdELIq0gD+IjmQ\ndwe5xB0oFdnlMivj1EFpVEzFYMW2GO1oCkukKgE=\n=2nFM\n-----END PGP SIGNATURE-----\n"},{"id":"507646","messageId":"028e01db3aca$75de0150$619a03f0$@nexbridge.com","threadId":"62507","inReplyTo":"6arLzsCWhxM8QTlPRbNStMLfz5ZqVJTTUSX1E1NXLiy_n_d0v0wFMiUK5brfkqTV3chUOp9OLYyBpIbe4tYQ6qvrLKDzfg5el0EWnqDIYDM=@proton.me","subject":"RE: How do you undo an add","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2024-11-19T21:31:51Z","receivedAt":"2024-11-19T21:32:05Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On November 19, 2024 3:59 PM, A bughunter wrote:\n>On Tuesday, November 19th, 2024 at 02:13, Kristoffer Haugsbakk\n><kristofferhaugsbakk@fastmail.com> wrote:\n>> On Tue, Nov 19, 2024, at 00:20, rsbecker@nexbridge.com wrote:\n>> > On November 18, 2024 5:10 PM, A bughunter wrote:\n>> > > ADD, ADD, ADD why cant they get that: ADD. ADD tracks files for\n>> > > commit. It's already been commit : push failed. Failed pushes piled up. I need\n>them untracked.\n>> > > How do you undo an add ( many adds): simple question. Without\n>> > > deleting any files, to repush 1 by 1.\n>> >\n>> > Once you have pushed an added file, your only option is\n>> > filter-branch to prune out the invalid content.\n>>\n>> git-filter-branch? Why not `git reset --hard` with `push --force-with-lease --force-\n>if-includes`? Maybe I’m missing something.\n>Yes you are missing something \"Without deleting any files,\" a bunch of irrelivent\n>and wrong answers is SPAM because literacy is necessity for participating in any ML.\n\nfilter-branch can be used to edit your repository if you accidentally added files\npost-commit. That is why I included it in my original reply - you are free to read\nthe fine manuals that this team produces for more information on that and the\nreset commands.\n\nOur answers are provided as a courtesy. We are all volunteers, and I would ask\nthat you consider the possibility of treating the people who have spent time\nin an attempt to answer your questions with a modicum of the same. Thank you.\n\n\n"},{"id":"507666","messageId":"n7ntzxp72gsrwaibjtxmmjiwpvkjtuw6i2h25nxdl6lkumdt5x@vjg5blmqjkxn","threadId":"62507","inReplyTo":"6arLzsCWhxM8QTlPRbNStMLfz5ZqVJTTUSX1E1NXLiy_n_d0v0wFMiUK5brfkqTV3chUOp9OLYyBpIbe4tYQ6qvrLKDzfg5el0EWnqDIYDM=@proton.me","subject":"Re: How do you undo an add","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2024-11-20T00:02:09Z","receivedAt":"2024-11-20T00:02:10Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Tue, Nov 19, 2024 at 08:58:51PM +0000, A bughunter wrote:\n> Yes you are missing something \"Without deleting any files,\" a bunch of\n> irrelivent and wrong answers is SPAM because literacy is necessity for\n> participating in any ML. \n\nPlease consider this your last warning. If you continue to be rude and abusive\nto members of this list, I will restrict your ability to participate in\ndiscussions here.\n\n-K\n"},{"id":"507784","messageId":"0ATsUGlsstLIpL-SRj2TaZ_LH0y2vDNYRledGKNf-Fkvn7OcpLUm4uvUzcQyeEZ3XPVbrqTbbU7j64bSg9GAaSvcmzYd_O9z9X4K4TE4o_E=@proton.me","threadId":"62507","inReplyTo":"4hiTc8Kx5yNhYuN8abv3QFJBuptM6VWZ9OKvkdZFlSI5y0zoK-lN_VHf-QCSEjllmSWvu9V-tbrvFOx17_P0Nq8UKxEcK3Rs2d02FjbYuUc=@proton.me","subject":"Re: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-20T20:01:39Z","receivedAt":"2024-11-20T20:02:00Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nOn Sunday, November 17th, 2024 at 05:24, A bughunter <A_bughunter@proton.me> wrote:\n\n> Maybe if I ask a queation a different way? What is the problem?\n> 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.\n\nA. You can't fully undo an 'add' because it creates a sha-object and objects are immutable.\n\nWhile objects are immutable, if I do mixed mode reset switching to an old-commit under HEAD then 'add' the same files again\nQ. Will it keep two copies as objects? \nA. No because when an identical file is added the object file is identical.  These become tree entries pointing to the same object. \nQ. May this overwrite the same object file because it is the same file? or because it is immutable will it reuse the old object file?\nA. When an identical file is added the old object shall be _ANSWER_HERE_\n\nI need to delete (or switch) the commit tree object to undo the 'add' (tracking) and delete the index (staged) that references the files which failed to push. The objects can be ignored because they are the same anyway when re-adding. After the tree and index are erased I can re add-commit-push.\n\nI need to identify the tree-objects to ignore and which tree to revert to. Use git status to compare with remote. For repush the commit-id should be reverted to match with the commit-id of the remote. This resets the HEAD to reference sha-id-something for the tree-object of <old-commit-id>. Effectively untracking and leaving the git ready to re-try those failed pushs.\nQ. how does git status compare if it does not ssh\nuse git log to find the commit-id?\nA. git status uses _ANSWER_HERE_ to compare with remote.\n\nIn precaution I moved the files which had not been pushed out of the git working tree to a safer dir. ( important note: this is a precaution which the user should not need to do )  So still not sure if these files would be deleted by reset.\n\n```--mixed\n               Resets the index but not the working tree (i.e., the changed\n               files are preserved but not marked for commit) and reports\n               what has not been updated. This is the default action.\n\n               If -N is specified, removed paths are marked as intent-to-add\n               (see git-add(1)).\n\ngit reset --mixed <commit-id> worked but had some funny results. The results were git status showing only the file of that revert-commit marked as deleted - presumably compared the last index from before reset, however the next 285 files were not mentioned - why  . Because the status reported a match with remote I proceeded anyway not knowing why all of the files not mentioned. \nQ. After a reset why does status only mention a single file of the many files which are now ignored?\nA. The reason git status only showed, after reset, a single file marked as deleted is because _ANSWER_HERE_\n\nThen I moved the files which had not been pushed and resumed working: workaround complete. \nUse-case[C] workaround completed. bugreport[A] and question[B] remain with these more questions here in this post yet unanswered. \n\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc+QCAJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAI99AQDhOYZBjPexoTNI3Vtk1kMk3fncUaR4AwmI5cWbTJzfQAEAjGKQ\nfZ6e65REGnoEoSq5Ml3czcG9tI+sEK+SI2f5ygA=\n=FW62\n-----END PGP SIGNATURE-----\n"},{"id":"508692","messageId":"0fyZjFuLfvDKSV32a70rBZ4q-iPMLmZtv4ITVBuqoUbtyUiD9CAbaCFgOKNsSh9Rq0tMszzyT1-kqf9bsWroZxEJXW_-Fg-VvBHKUqfCZZM=@proton.me","threadId":"62507","inReplyTo":"0ATsUGlsstLIpL-SRj2TaZ_LH0y2vDNYRledGKNf-Fkvn7OcpLUm4uvUzcQyeEZ3XPVbrqTbbU7j64bSg9GAaSvcmzYd_O9z9X4K4TE4o_E=@proton.me","subject":"Re: How do you undo an add","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-12-05T21:03:33Z","receivedAt":"2024-12-05T21:03:44Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\n\n\n\nA lingering [help] question answered interspersed.\n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n\nOn Wednesday, November 20th, 2024 at 14:01, A bughunter <A_bughunter@proton.me> wrote:\n\n> On Sunday, November 17th, 2024 at 05:24, A bughunter A_bughunter@proton.me wrote:\n\n> Q. how does git status compare if it does not ssh\n> use git log to find the commit-id?\n> A. git status uses ANSWER_HERE to compare with remote.\n\nQ. How does git status compare if it does not ssh? A. git status uses essentially a cache of the last value we fetched to compare with remote. See also \"is comparing your branch with the local tracking branch we have, refs/remotes/origin/main. It doesn't touch the network, and that tracking branch is essentially a cache of the last value we fetched.\" ( https://lore.kernel.org/git/20241205201952.GB2635755@coredump.intra.peff.net/ )\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmdSFSIJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAIzzAQCCC3GPjxGsJu/OE51LuIBbmhZ7o3FwxuRo61m9l4V0rAEAjn82\ncLmBej/67p7s3eYLzQdtqfBP1LQz3bloa9uXjQE=\n=5q/u\n-----END PGP SIGNATURE-----\n"}]}