I got confused when creating a new git repository and pushing it to a ssh based git server.
What I've done:
mkdir knowledge_base
cd knowledge_base
git init
(create multiple files)
git add <some files>
git commit -m 'initial'
until everything is perfect here
now a do:
git remote add origin ssh:
git push --set-upstream origin master
Error:
fatal: '/ home / gitzfrdh / gitrepos / knowledge_base' is not a gitfatal repository: Failed to read from the remote repository.
Please make sure that you have the correct permissions and the repository exists.
Yes, I know that the repo did not exist. My idea is to click this new one.
Should I first create a bare server-side repo?
EDIT: If I run on the server:
mkdir knowledge_base
cd knowledge_base/
git init --bare
and on the client again a:
git push --set-upstream origin master
everything is working.
But I think this is not the intention to have a complete excess on the server? Am I mistaken?
Git
git