Git is corrupted with commit

I'm a little new to git, but I read the git book from my site. So I started using it with GitLab installed on my server.

I worked on SVN before the first commit was exported by SVN. My friend is also working on the same project (his name is Lucas).

I created the source of the / dev branch to get the source / master fully stable, and then develop on / dev. I also created the branch258 function I'm working on. When I tried to pull the source / dev to make changes before merging my wonderful function, I have the following:

$ git pull origin dev fatal: object 18c29b4c26d7b0d34719d10ada6901c6024f91e6 is corrupted fatal: The remote end hung up unexpectedly 

It looks like the 18c29b4 object is a pink fixer (cf ScreenShot), which only slightly modifies the .gitignore file

I ran git fsck --full, but the key I have did not help me:

 $ git fsck --full dangling blob 0c87d2eb401651ec3045eb0248d54ed546206dbe dangling blob 1cd17aadc009ba9d39d1137533d65107ca54da95 

Blob 0c and 1c is just one file that I modified in my last commit in feature_258.

I find more than 3 hours in a Google search of the Linus Torvalds method and other StackOverflow posts without finding a good solution.

If this can save me, maybe I can reinstall the branch before the BAD completes and re-does my work (which I saved in a different directory to make sure)

Screenshot of SourceTree

+4
source share
1 answer

Usually this:

 fatal: The remote end hung up unexpectedly 

Reports the end of the connection. Maybe (maybe) this is not a Git repo problem, but some kind of system problem. If I were you, I started by checking file permissions in the repo. If you use gitolit, it will be something like:

 chown git:git -R $GITOLITE/repositories/my_repo.git/ chmod u+rw -R $GITOLITE/repositories/my_repo.git/ 

Then, if this is not a problem, I tried to clone the repo on the server:

 git clone $GITOLITE/repositories/my_repo.git/ ~/test_clone.git 

There is also another suggestion - register as a git user and check the version of Git.

+1
source

All Articles