Hey. Such a problem. At the beginning, a little incorrectly added a folder from another repository to the repository (forgot to delete the .git meta-folder), made add. commit commit push Everything is somehow flooded on GitHub. But from the web interface to the folder does not go, and to pull on another PC to download just an empty folder.

Problem in tasks

After fixing the main local repository, it does not work out push.

$ git push Counting objects: 36, done. Delta compression using up to 4 threads. Compressing objects: 100% (35/35), done. Writing objects: 100% (36/36), 11.71 KiB | 1.95 MiB/s, done. Total 36 (delta 15), reused 0 (delta 0) remote: error: object aaa8ce61733a20e8bc12913076e1c949131728c3: nullSha1: contains entries pointing to null sha1 remote: fatal: Error in object error: remote unpack failed: index-pack abnormal exit 

What else needs to be fixed?

Addition: When executing the command:

 git filter-branch --index-filter "git rm --cached --ignore-unmatch Task/*" HEAD 

Issues:

 error: invalid object 160000 0000000000000000000000000000000000000000 for 'Tasks' warning: cache entry has null sha1: Tasks error: invalid object 160000 0000000000000000000000000000000000000000 for 'Tasks' fatal: git-write-tree: error building trees fatal: Not a valid object name could not write rewritten commit 

Link to github'e repository

  • I just delete the files from the githab (in the web interface) and then re-clone the repository does not work? - Viacheslav Vedenin
  • OK. How to do it? I do not know how to delete files from the command line. And I'm not sure that the cant in the file is on the server. - IlyaBeetle
  • Go on the web to the file page on github and there will be a basket sign in the upper right corner (next to something like: 12 lines (9 sloc) | 922 Bytes | Raw | Blame | History), the numbers will of course be different, Viacheslav Vedenin
  • I can not log in as a file. - IlyaBeetle
  • one

1 answer 1

You need to rollback the last commit, this is done using

 git revert номер-коммита 

I made a pull request to your repository with a rollback of your last commit, save the modified files from the last commit, accept my pull request, and then re-fill it without the problem directory. Or you can do a rollback in your local repository:

 git revert 9b32296f77d7b7d83491031609dc275da9ca19d4 

After that push should go normally.