Re: Access to Git Repos within PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 23/03/15 16:48, Paul M Foster wrote:
> I haven't noticed this question asked before, so I'll ask it.
> 
> Is there a "fully-baked" solution for using git to manage, say, blog
> posts and manage the whole thing via PHP?
> 
> Seems to me like you could use git to fetch and store datestamped and
> incremental blog posts. And thus, one could build a blog infrastruction
> around this. Problem is, what if the hosting company doesn't provide the
> git program on its servers, or it doesn't allow running external git
> commands via a shell?
> 
> The solution would be some sort of "module" written in PHP which would
> allow access to git objects, both the fetching, creation and updating of
> them. The question then becomes, is there any PHP-based solution to
> doing this, which is "fully-baked", as in, not half-built and then
> abandoned?
> 
> Paul
> 

Sorry for emailing you directly Paul - I do that from time to time (doh).

I use git to do practically everything but I run servers (I also provide
normal users access to ssh/git). Most providers like GitHub and
BitBucket provide 'hooks' so you can automate things after commits are
pushed. Alternatively get SSH access and pull manually.

You can remove the need for a database by using files. I am making a
website that uses markdown files that have meta data added to the top of
them.

I would never do this in PHP but there is a wrapper at
https://github.com/sebastianbergmann/git so it might be possible.
Instead I would approach it differently and remove the restrictions you
are facing by getting a VPS like the previous email recommended. There
might even be hosting providers that advertise git as a feature.

Gibbs

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux