I bought a personal dev block that I will use to deploy the material that I create on my laptop. I thought it would be nice to use Git for code management. The idea was that I would continue to do on my laptop and, when necessary, would make changes to the remote dev block.
- I initialized the git repo to the field and
- cloned it on my laptop.
But after doing git push I get this error:
remote: error: refusal to update the verified branch: refs / heads / master remote: error: by default, updating the current branch in a non-bare repository remote: error: is denied because this will lead to an inconsistency between the index and the remote: error tree of work that you clicked and would require "git reset --hard" to match
I know that the remote repo was not open.
I want to ask if the only way can go with my setup:
- Initialize bare repo on server
- Clone it on my laptop.
- add new files to the local laptop repository and commit files
- click on relay remote dev.
Even this setup gives me errors:
No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. fatal: The remote end hung up unexpectedly
EDIT
I tried
git push origin master
Received this error:
error: unable to create directory for .git/refs/remotes/origin/master error: Cannot lock the ref 'refs/remotes/origin/master'.
Oh dumb to me ... I think it's sudo , as in
sudo make me intelligent
git installation
user201788
source share