-1

I do have an existing project on my internet server. now i decided to start git this. what i have to do to make a clean git out of it? What i tried / done so far on the server:

git init
git add .
git commit -m "initial"

than on locale machine:

git pull ssh://user@server/project
...
fatal: '/project' does not appear to be a git repository
fatal: Could not read from remote repository.

what are the steps i have to do?

thanks...

CheVegana
  • 1
  • 1

1 Answers1

0

Adding this answer as you followed up with questions..

First check that your server repository is initialised as a git repository.

Then check that the path you have provided git is pointing to your server repository.

As @matt pointed out, use git clone ssh://user@server/project to make a local copy of the remote repo.

This is simpler (and the standard method) than initialising a local git repo, adding the remote url and pulling.

Hint: If you're not working inside the repository in the remote server (ie all distributed work will take place on machines other than the server) then it makes sense to use a bare repository, see this link:

How do you use "git --bare init" repository?

fham_526
  • 121
  • 8
  • Thx to you and matt. It's running now! – CheVegana Apr 27 '20 at 09:53
  • now i cloned and made some changes on master, commitet them and successfully pulled them to my clone. now i added a new file locally but when i push that commited changes i got: ```remote: error: insufficient permission for adding an object to repository database objects remote: fatal: failed to write object error: remote unpack failed: unpack-objects abnormal exit fatal: Unable to create '.../.git/packed-refs.lock': Permission denied error: failed to run pack-refs To ssh://... ! [remote rejected] master -> master (unpacker error) error: failed to push some refs to 'ssh://...' ``` – CheVegana Apr 27 '20 at 16:16
  • I'm new to answering questions but I think your comment merits a separate question. Also - did you try looking for an answer? A very quick search gave this answer: https://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab – fham_526 Apr 28 '20 at 09:27
  • thx, yes i searched for that problem but i cant change usergroud on my local windows system. and when i change that on the runing live remote server maybe something wont work than. little bit confused. – CheVegana Apr 29 '20 at 10:49