'Is it possible to install git on server and make a repository of existing project at production mode

I have a Laravel 8 project which is already live on server and I have made so many changes on this project using FileZilla FTP Connection.

Now I need to make a repository of this project using Git but I can not download all files to system and then run the Git for making the repository.

So I wonder, is there any way to run the git live on server in the production mode for making a new repository of existing project, therefore the files and folders won't be lost.

I know this question might look a little newbie but I would really appreciate any idea or suggestion from you guys...



Sources

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

Source: Stack Overflow

Solution Source