Git deplyoment question



I have a few question about how to use git properly with gearhost.

I have deployed a CMS with git and that’s fine.

So now the user upload some images or makes changes to files through the CMS if i do git push again will it overwrite the remote files that were change by the CMS with my local files ?

I expect that it will and that i should do git pull first but git pull always tells me i am uptodate.

If the file system changes from another source via FTP or by the CMS itself does that mean i can only use FTP ?


Sounds like you are not doing a server-side git commit. You would need to use terminal access to run git commit and then a git push to your respiratory. Once you have done this you would need to pull it down to your local computer from the respiratory. Hope this helps. :smile:


No not really helpfull.

Obviously when the content editor makes changes and CMS saves them to file a GIT commit is not made.
If there was a gerhost API call to create a GIT commit i could change the CMS to make a commit when it changes files but it seems there is no such gearhost API function.

I can use terminal access with gear host to commit files on the server ?
How do i do this ?


I am not sure if it will work based on the permissions given to us on cloudsites but php have a function called shell_exec which allows you to execute command line. Or better yet after a bit of googling I found a bit wrapper in php.

Perhaps this can be utilized to build a solution. Again not sure if the permissions on the server will allow but this is the alternative I would suggested based on the lack of terminal access or an API call.


Well you were right there is a terminal i had no clue, its not documented.

there is an entire kudu console so many great features

a lot of people are asking for feature that already exist…
– remote site replication
– phpmyadmin
– golang
– visual studio online (awesome)

Its also possible to connect to it with kodoexec client and use the terminal from your computer.

But it is also possible to to use the wwwroot folder as repository then git pull works as i expect but then no more git roll backs, but great for using git to backup the entire site with one command.

This app setting is needed to be added
value: wwwroot

After that i tried making commits through visual studio online and git pull worked.

More info about it:

And here is someone describing it in more detail with using umbraco:


Kudu’s documentation can be found here
hope this helps