Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git bash fail to push branch with error message: "object directory does not exist"

Tags:

git

bash

recently I've updated my Git Bash to the latest version and now when I'm trying to push a branch to the remote server I get an error message:

$ git push --set-upstream origin bugs/purlin_support_reactions
Counting objects: 41, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (41/41), 4.91 KiB | 0 bytes/s, done.
Total 41 (delta 33), reused 0 (delta 0)
remote: error: object directory /192.168.10.1/strengs/strengs_master.git/objects does not exist; check .git/objects/info/alternates.
remote: fatal: unresolved deltas left after unpacking
error: unpack failed: unpack-objects abnormal exit
To //192.168.10.1/strengs/strengs_master.git
 ! [remote rejected] bugs/purlin_support_reactions -> bugs/purlin_support_reactions (unpacker error)

error: failed to push some refs to '//192.168.10.1/strengs/strengs_master.git'

The object directory does exist (checked), check .git/objects/info/alternates does not exist. In info there is only packs file.

What could go wrong?

like image 428
Georgi Avatar asked Dec 13 '16 07:12

Georgi


2 Answers

So in general. In git version 2.11.0.windows.1 if your origin destination begins with \\192.168....or similar the first backslash for some reason is ignored (kind of bug). Workaround - mount network drive i.o. \\192.168....

EDIT: This issue must be solved with upgrade to git v2.12.0

like image 145
Georgi Avatar answered Nov 17 '22 11:11

Georgi


This is a known issue which is outlined on the git-for-windows github issue tracker page https://github.com/git-for-windows/git/issues/979

like image 6
Jonathan Katon Avatar answered Nov 17 '22 10:11

Jonathan Katon