Questions tagged [git-fsck]

A git command line tool that verifies the connectivity and validity of the objects in the database

git-fsck tests SHA-1 and general object sanity, and it does full tracking of the resulting reachability and everything else. It prints out any corruption it finds (missing or bad objects), and if you use the --unreachable flag it will also print out objects that exist but that aren't reachable from any of the specified head nodes (or the default set, as mentioned above).

Resources:

34 questions
3
votes
2 answers

Git repository broken by interrupted commit

I broke my local git repository by interrupting a git commit with Ctrl+C (two commits back). How can I fix it ? Output of git stash : $ git stash fatal: bad revision 'HEAD' fatal: bad revision 'HEAD' fatal: Needed a single revision You do not have…
SecT0uch
  • 71
  • 7
2
votes
1 answer

git fsck : Cannot fix broken link

I cannot succeed fixing a git broken link. Here is the context : $ git pull Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. warning: The last gc run reported the following. Please correct…
SebMa
  • 4,037
  • 29
  • 39
2
votes
1 answer

unknown object type 0 at offset - all repo mirrors corrupted preventing filter-branch subdirectory-filter

1) Problem Description I have several pack files saying unknown object type 0 at offset, and unlike 99% of posts on the web this isn't a local problem but appears in both remote and cloned repos. 2) What I want to do How do I simply remove those…
Sridhar Sarnobat
  • 25,183
  • 12
  • 93
  • 106
2
votes
0 answers

Git status shows "fatal: bad object HEAD"

I have just done a git status and it's throwing the following error: fatal: bad object HEAD I have also tried git fsck which gives the following output: Checking object directories: 100% (256/256), done. error: HEAD: invalid sha1 pointer…
V4n1ll4
  • 5,973
  • 14
  • 53
  • 92
2
votes
0 answers

How to find the first commit introducing a specific tree?

Given the following git fsck output $ git fsck --strict --no-dangling Checking object directories: 100% (256/256), done. error in tree deadbeefabad1dea38efe0a776ce5ac0b98b3d6c: not properly sorted Checking objects: 100% (9293/9293), done. How do I…
nulltoken
  • 64,429
  • 20
  • 138
  • 130
1
vote
0 answers

How to repair a damaged git repository

I executed rm -rf on my working directory and even I interrupted the command immediately execution, I've lost several repositories that were not pushed to the remote (yet). One particular important repository that didn't have the latest commits(two…
Mihai
  • 438
  • 3
  • 13
1
vote
2 answers

Broken local git repository with unpushed commits/files

I have the problem that I copied with an USB driver from my old machine to my new machine a git project. This git project has several commits I didn't push on git remote git repository. During the move something wen't wrong and I ended up having a…
Michael Burger
  • 643
  • 1
  • 9
  • 17
1
vote
1 answer

git fsck segmentation faultrectories

I'm using git in Rubymine. After another commit I opened git push window and saw object file .git/object/55/4d...e6 is emptyunable to read .... instead of the commit name. Running git fsck -full gives me this: Segmentation faultrectories: 33%…
Marat
  • 622
  • 7
  • 21
1
vote
0 answers

How to push a large git repository without launching a git pack-index command?

I know about this question. I already performed my local modifications, however it seem, the official git project perform agit fscklocally before pushing to origin. C:\Cygwin\home\example\utils>git push origin master Warning: Permanently added…
user2284570
  • 2,891
  • 3
  • 26
  • 74
1
vote
1 answer

How to capture log of git fsck --full --verbose

How do I capture output of git fsck --full --verbose in a log file? I tried with git fsck --full --verbose > log and git fsck --full --verbose | tee log but neither is working for me. What should I do?
user1061511
1
vote
2 answers

Undo git rm -r f (ambiguous argument 'HEAD') before first commit

I did a git rm -r -f on an ENTIRE directory in a new repo before I had ever committed. I had no branches. I tried the answers on Stack Overflow, but none helped. I tried this: git reset --hard HEAD But got this: fatal: ambiguous argument 'HEAD':…
SirCameron
  • 53
  • 1
  • 5
0
votes
0 answers

understand how a commit is reachable

I deleted a branch and I was presuming that a certain commit (let's call it C) was no longer reachable. I was able to find the commit in question using git reflog. However, I am puzzled by the fact that that commit doesn't show up when I do: git…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
0
votes
0 answers

Only recovering LaTeX files with git fsck

I accidentally deleted a large number of LaTeX files by using git stash instead of git stash -u. I have recovered a bunch of them following the instructions here using the command: git fsck --full --no-reflogs --unreachable --lost-found | grep blob…
Noah Snyder
  • 101
  • 1
  • 3
0
votes
0 answers

git fsck can't find dangling/unreachable commits

I have just reset --hard back by about 15 or so commits on a branch all the way back to first common parent with master, and deleted all other branches, tags etc on those 15 commits, confirming so with branch --contains. I wanted to initially…
0
votes
1 answer

Git fsck --unreachable --lost-found does not save objects as files at the lost-found directory

I used fsck and found that I have some dangling objects, and more than that (in amount) unreachable objects. fsck --lost-found does save the dangling objects as files at the lost-found directory, but when I want for it to write all unreachable…
Gal Grünfeld
  • 800
  • 3
  • 9
  • 32