0

here is what I did: 1. created on my Synology file station an initial repository using "git init". 2. on my local machine, I performed the following commands: 2.1 git init 2.2 git add . 2.3 git remote add origin [added remote URL on the Synology file station via SSH] 2.4 git push origin master

I received an error error: refusing to update checked out branch: refs/heads/master

that I fixed by running the following command on the remote server: "git config receive.denyCurrentBranch ignore"

after performing 2.4 again everything worked out.

the problem is, I can see the branch, I can also clone the code from my remote server but I cannot see any files on the Synology file station. I need the files, for example, to let node.js for example run the server from my remote server.

do you know how to fix this? make sure that the files are visible "physically" on the machine?

I tried various solutions but rather than uploading my code file by file to the NAS server I cannot find anything that helps me do this with GIT and also have my files available on the server.

FlaT
  • 99
  • 2
  • 10
  • The reason that pushes to the current branch are denied by default is because of this exact problem. The message that told you about "git config receive.denyCurrentBranch ignore" also explained this problem in detail, along with the actual solution. Revert that setting and go back and reread that message. – Joseph Sible-Reinstate Monica Jan 02 '19 at 00:54

1 Answers1

0

If you really have to push to a non-bare repo, you should have set:

git config receive.denyCurrentBranch updateInstead

See "Git push to checkout?".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250