{"thread":{"id":"61102","subject":"having issue with git commands. Probably a bug","startedAt":"2024-03-12T21:36:24Z","lastAt":"2024-03-13T21:35:37Z","messageCount":2,"participants":["Nick","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"490506","messageId":"CA+cJT-HV=GH84p1nQaoywnJABDWDK9PS-StzW8BTEBezHuvocg@mail.gmail.com","threadId":"61102","inReplyTo":null,"subject":"having issue with git commands. Probably a bug","fromName":"Nick","fromEmail":"billingidentity@gmail.com","sentAt":"2024-03-12T21:36:12Z","receivedAt":"2024-03-12T21:36:24Z","isPatch":false,"sender":{"key":"billingidentity@gmail.com","avatar":null},"body":"Hi Git Team,\n\nI am having the following issue:\nMy repository has all these files but my terminal shows that they are\ndeleted. My repo is in Amazon Web Services.\n\nMy terminal show the following:\n\nChanges to be committed:\n  (use \"git restore --staged <file>...\" to unstage)\n        deleted:    Page2 csv file.csv\n        deleted:    Page3 and Page4 csv file.csv\n        deleted:    dummy demo.mp4\n        deleted:    page1 csv file.csv\n        deleted:    page5 csv file.csv\n        deleted:    page6 csv file.csv\n\nI have been trying to delete these files from my terminal and from my\nrepository but git commands are not working.\n\nGit commands:\n\n#git commit -m \"try to delete csv files and dummy demo\"\nerror: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7\nfor 'page1 csv ps.csv'\nerror: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7\nfor 'page1 csv ps.csv'\nerror: Error building trees\n\n#git log -- page1\\ csv\\ ps.csv\ncommit c302c5202fc374739c0275b2e507a957be45e6\nDate:   Wed Feb 14 22:03:46 2024 +0000\n    Added page1 csv ps.csv\nerror: Could not read 32286e5dfdb73b4cfa9eb87abf140dc81e68ab\nfatal: cannot simplify commit aee35d8a1bcde08c2249df029b06d46537751f\n(because of 32286e5dfdb73b4cfa9eb87abf140dc81e68ab)\n\n#git push\nEverything up-to-date\n# git status\nOn branch BranchName\nYour branch is up to date with 'origin/BranchName'.\nChanges to be committed:\n  (use \"git restore --staged <file>...\" to unstage)\n        deleted:    Page2 csv file.csv\n        deleted:    Page3 and Page4 csv file.csv\n        deleted:    dummy demo.mp4\n        deleted:    page1 csv file.csv\n        deleted:    page5 csv file.csv\n        deleted:    page6 csv file.csv\n\nPlease could you guide me?\nI appreciate!\nThanks\n"},{"id":"490583","messageId":"ZfIcJo3Jk8XyrWiR@tapette.crustytoothpaste.net","threadId":"61102","inReplyTo":"CA+cJT-HV=GH84p1nQaoywnJABDWDK9PS-StzW8BTEBezHuvocg@mail.gmail.com","subject":"Re: having issue with git commands. Probably a bug","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-03-13T21:35:34Z","receivedAt":"2024-03-13T21:35:37Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-03-12 at 21:36:12, Nick wrote:\n> Hi Git Team,\n> \n> I am having the following issue:\n> My repository has all these files but my terminal shows that they are\n> deleted. My repo is in Amazon Web Services.\n> \n> My terminal show the following:\n> \n> Changes to be committed:\n>   (use \"git restore --staged <file>...\" to unstage)\n>         deleted:    Page2 csv file.csv\n>         deleted:    Page3 and Page4 csv file.csv\n>         deleted:    dummy demo.mp4\n>         deleted:    page1 csv file.csv\n>         deleted:    page5 csv file.csv\n>         deleted:    page6 csv file.csv\n> \n> I have been trying to delete these files from my terminal and from my\n> repository but git commands are not working.\n> \n> Git commands:\n> \n> #git commit -m \"try to delete csv files and dummy demo\"\n> error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7\n> for 'page1 csv ps.csv'\n> error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7\n> for 'page1 csv ps.csv'\n> error: Error building trees\n> \n> #git log -- page1\\ csv\\ ps.csv\n> commit c302c5202fc374739c0275b2e507a957be45e6\n> Date:   Wed Feb 14 22:03:46 2024 +0000\n>     Added page1 csv ps.csv\n> error: Could not read 32286e5dfdb73b4cfa9eb87abf140dc81e68ab\n> fatal: cannot simplify commit aee35d8a1bcde08c2249df029b06d46537751f\n> (because of 32286e5dfdb73b4cfa9eb87abf140dc81e68ab)\n\nThis looks like your repository has some corruption; it's missing some\nobjects that it should have.  You can verify this with `git fsck`.\n\nOnce you've done that, you'll probably want to find another source for\nyour corrupt objects.  The howto documentation[0] covers how to recover\nfrom corrupted objects (search for \"corrupted\").  You could also try\nmaking a copy of the repository to another location, exploding any\ncorrupted packfiles, deleting the corrupt objects, and then doing a `git\nfetch REMOTE OBJECT`, which will work if the remote supports protocol v2\nand partial clone and the server has the remote objects.\n\nAre you perhaps storing this repository in a directory with a cloud\nsyncing service, such as OneDrive, iCloud, or Dropbox?  If so, that's\nlikely the cause of that corruption, and you should definitely not do\nthat in the future.  Cloud syncing services can add, remove, and rename\nfiles without you noticing, which causes the corruption.\n\n[0] https://github.com/git/git/tree/master/Documentation/howto\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"}]}