I want to merge my local branch with the branch on my server. On my local computer I navigate to my project folder and then type:
git remote add origin ssh://myuser@myhost:22/html/myproject
But I get the error message:
external Repository origin already exists
So I tried to use another branch name:
git remote add testbranch ssh://myhost@myuser:22/html/myproject
and then
git push testbranch master
and then I get the error message:
fatal: '/myproject' does not appear to be a git repository fatal: Could not read from Remote-Repository. Please ensure that the correct access permissions exist and the repository exists.
I checked /myproject with git status, it is a git repository. The permission rights of the folder are 775.
CodePudding user response:
external Repository origin already exists
Then the command to use would be:
git remote set-url origin ssh://myhost@myuser/html/myproject
But for that, you would need a bare repository in /html/myproject
, which it is probably not.
Initializing a bare repository, and adding a post-receive hook is usually the way to updtae /html/myproject
content.