I do have an existing project on my inte.net 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...
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.