Virtualmin does have a “git” plugin though it doesn’t directly do what you are suggesting.
Personally, I wrote a script called “website-upload” for my own use which takes two parameters…
--profile
--version
When I write source code for websites and webapps I do so using my own versioning process. The “profile” is the path to a file which holds some variables such as “host”, “user” and “paths” (locally and remotely)
I pass the “version” along with it, telling the script which version of the code I want to publish.
Typically I create two types of profiles, “sandbox” and “live” which are for testing and production respectively.
Aside from uploading the files, my script also creates “minified” javascript, and compiles a minified version of CSS from SASS based templates.
The script works well for my needs, and I’d be happy to share it if you think it might help you.
Keep in mind, the script was written in PHP and requires a few extra dependencies.