Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* having issue with git commands. Probably a bug
@ 2024-03-12 21:36 Nick
  2024-03-13 21:35 ` brian m. carlson
  0 siblings, 1 reply; 2+ messages in thread
From: Nick @ 2024-03-12 21:36 UTC (permalink / raw
  To: git

Hi Git Team,

I am having the following issue:
My repository has all these files but my terminal shows that they are
deleted. My repo is in Amazon Web Services.

My terminal show the following:

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        deleted:    Page2 csv file.csv
        deleted:    Page3 and Page4 csv file.csv
        deleted:    dummy demo.mp4
        deleted:    page1 csv file.csv
        deleted:    page5 csv file.csv
        deleted:    page6 csv file.csv

I have been trying to delete these files from my terminal and from my
repository but git commands are not working.

Git commands:

#git commit -m "try to delete csv files and dummy demo"
error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7
for 'page1 csv ps.csv'
error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7
for 'page1 csv ps.csv'
error: Error building trees

#git log -- page1\ csv\ ps.csv
commit c302c5202fc374739c0275b2e507a957be45e6
Date:   Wed Feb 14 22:03:46 2024 +0000
    Added page1 csv ps.csv
error: Could not read 32286e5dfdb73b4cfa9eb87abf140dc81e68ab
fatal: cannot simplify commit aee35d8a1bcde08c2249df029b06d46537751f
(because of 32286e5dfdb73b4cfa9eb87abf140dc81e68ab)

#git push
Everything up-to-date
# git status
On branch BranchName
Your branch is up to date with 'origin/BranchName'.
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        deleted:    Page2 csv file.csv
        deleted:    Page3 and Page4 csv file.csv
        deleted:    dummy demo.mp4
        deleted:    page1 csv file.csv
        deleted:    page5 csv file.csv
        deleted:    page6 csv file.csv

Please could you guide me?
I appreciate!
Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: having issue with git commands. Probably a bug
  2024-03-12 21:36 having issue with git commands. Probably a bug Nick
@ 2024-03-13 21:35 ` brian m. carlson
  0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2024-03-13 21:35 UTC (permalink / raw
  To: Nick; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2494 bytes --]

On 2024-03-12 at 21:36:12, Nick wrote:
> Hi Git Team,
> 
> I am having the following issue:
> My repository has all these files but my terminal shows that they are
> deleted. My repo is in Amazon Web Services.
> 
> My terminal show the following:
> 
> Changes to be committed:
>   (use "git restore --staged <file>..." to unstage)
>         deleted:    Page2 csv file.csv
>         deleted:    Page3 and Page4 csv file.csv
>         deleted:    dummy demo.mp4
>         deleted:    page1 csv file.csv
>         deleted:    page5 csv file.csv
>         deleted:    page6 csv file.csv
> 
> I have been trying to delete these files from my terminal and from my
> repository but git commands are not working.
> 
> Git commands:
> 
> #git commit -m "try to delete csv files and dummy demo"
> error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7
> for 'page1 csv ps.csv'
> error: invalid object 100644 d54132721804e177f865b31a807d9fbebc7ff7
> for 'page1 csv ps.csv'
> error: Error building trees
> 
> #git log -- page1\ csv\ ps.csv
> commit c302c5202fc374739c0275b2e507a957be45e6
> Date:   Wed Feb 14 22:03:46 2024 +0000
>     Added page1 csv ps.csv
> error: Could not read 32286e5dfdb73b4cfa9eb87abf140dc81e68ab
> fatal: cannot simplify commit aee35d8a1bcde08c2249df029b06d46537751f
> (because of 32286e5dfdb73b4cfa9eb87abf140dc81e68ab)

This looks like your repository has some corruption; it's missing some
objects that it should have.  You can verify this with `git fsck`.

Once you've done that, you'll probably want to find another source for
your corrupt objects.  The howto documentation[0] covers how to recover
from corrupted objects (search for "corrupted").  You could also try
making a copy of the repository to another location, exploding any
corrupted packfiles, deleting the corrupt objects, and then doing a `git
fetch REMOTE OBJECT`, which will work if the remote supports protocol v2
and partial clone and the server has the remote objects.

Are you perhaps storing this repository in a directory with a cloud
syncing service, such as OneDrive, iCloud, or Dropbox?  If so, that's
likely the cause of that corruption, and you should definitely not do
that in the future.  Cloud syncing services can add, remove, and rename
files without you noticing, which causes the corruption.

[0] https://github.com/git/git/tree/master/Documentation/howto
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-13 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 21:36 having issue with git commands. Probably a bug Nick
2024-03-13 21:35 ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).