Git Repo setup on sites

Hi all

We are working on many projects and want to implement git version controls for our Wordpress builds and feature development. We can copy down the site with DevKinsta which will setup the database and uploads fine, but we need to be able to link a git repo to the project.

When using git in terminal of the project once downloaded we received some conflicts and need to rebase. the way around this we have found is to use terminal to clone the repo into the dekinsta site files folder and then move the wp-config from the copied site and uploads, which keeps the connection for the database.

This then allows us to work locally and push branches to our repos.

Does anyone have any other setups or workarounds that is easier than this? Initially this is a one time thing for each project but if we could avoid this and just use the downloaded version of the site and implement git in that, that would be helpful.