Reputation: 59
I'm having this problem regardless of a new clone , reinstalling git extension or even deleting the local repository . Any helps ? The full error log is this
git push --recurse-submodules=check --progress "origin" refs/heads/master:refs/heads/master
Counting objects: 133, done.
Delta compression using up to 4 threads.
Total 94 (delta 77), reused 0 (delta 0)
error: Couldn't set refs/heads/master
To M:/Madsanda Dev
! [remote rejected] master -> master (failed to write)
error: failed to push some refs to 'M:/remote folder'
Done
The only thing I noticed here is
git push --recurse-submodules=check --progress "origin" refs/heads/master:refs/heads/master
, is usually
git push --recurse-submodules=check --progress "origin" master:master
Please advice , thanks .
Upvotes: 3
Views: 11944
Reputation: 1
Enough hints here to fix my problem with a repo on UNC share. NTFS permissions for non-admins were set to Write/Change. Elevating to Full control on the folder eliminated the error.
Upvotes: 0
Reputation: 103
I'm using Source Tree. Running in Administrator mode worked for me.
Upvotes: 1
Reputation: 898
I've had this error when my files were on a network drive folder.. Copying my project into local folder with full permissions resolved it.
Upvotes: 3
Reputation: 22376
You need to create a file HEAD
inside .git
folder and write in that file ref: refs/heads/master
Example:
echo ref: refs/heads/master >.git/HEAD
Upvotes: 0