To set your git repo on your production server.
go tho the root directory of the server (i.e. public_html or httpdocs etc.)
then run:

git init

run (to connect your server with the cloud repo)

git remote add origin https://PATH_TO_YOUR_REPO

Then if you want your production server to always pull from the remote origin (so you will be able to run git pull instead of git pull origin master)
You need to add this to your /.git/cofig, you can do this like this:

 git config branch.master.remote origin
 git config branch.master.merge refs/heads/master

Now you can run git pull, and it will automatically pull from your master branch.


If you also git to remember your password (so you won’t need to type it with every “git pull”)

enable credentials cache: (make sure you have git version >, which you probably have).

git config --global credential.helper cache