'link a copy of a GIT repository source with a repo

There is a proyect in a GIT repository and this proyect is installed in a production server but GIT is not initialized. Some people have edited files in the source of the production server last months but no GIT there. I have not created the repository or installed on the server but now I want to install GIT in the production server and link the existing source to the GIT repository and commit the changes of the existing source to the GIT repository.

I've tried to copy the files of the production server in a local directory of mi PC and then:

git init
git remote add origin https://.....git

When I run git status it returns:

On branch master
No commits yet
Untracked files:
...
...

I expected only the distinct files to appear but absolutely all files appear untracked in red.

How I do that?

Thanks in advance

git


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source