I answered this question over here as well
In my case, it looks like Git (v 2.6.3) tried to create its own read/write permissions on the Samba drive. This would prevent the pack files and/or objects from getting written (unpack error)
remote: error: unable to write sha1 filename ./objects/pack/pack-<some_hex_string>.pack: Permission denied
remote: fatal: cannot store pack file
error: unpack failed: index-pack abnormal exit
To z:\git\<repo name>
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs
I went back and forth on trying to fix. Finally, since I had control of the Samba machine, I added a line to the samba drive config, which says "inherit permissions = yes". I restarted Samba and tried to push. It worked!
This worked for me since I'm the only person using the Samba server. For others, you may have the play around with "force directory mode" or "force create mode". You can find the man pages for those over here:
https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControls.html