Search code examples
gitprojecttransfer

Transfer a project to git?


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.


Solution

  • 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.