Reputation: 2027
I have a project on a local machine, and a git repository on a remote server. Is there a way I can push/commit/transfer this project to the remote server? It's telling me "not a git repository", I know that! I just want it on the remote server.
Upvotes: 0
Views: 190
Reputation: 7985
Your remote repository must be a bare repository. Otherwise you can't push to this remote repository. To create it, just pass the option bare: git init --bare
.
Upvotes: 0
Reputation: 7475
You could clone
the remote repo onto your local machine, copy your files into the directory, add
the new files, commit
them and push
them back to the remote server.
cd /to/some/directory
git clone [uri]
Then copy your files into the directory
git add -A
git commit -m "Added local project files"
git push origin master
Assuming you know git, you should be able to get this to work.
Upvotes: 4
Reputation: 889
Is the project a git repo yet? If not, you'll need to first initialize it as a git repository on the local machine, make sure that all the project files are committed, and then push the project files to the remote repo.
Upvotes: 0