Tag: php

creating a patch using gitonomy gitlib library

I am using Gitonomy libray Git lib to manipulate Git repository through php. I am to create patch file from a repository and there is no function for creating, reverting and applying patch files. There is a function named ‘run’ that can run git commands directly but they are ended up in exceptions. May be […]

PHP form works locally but not on Heroku

I recently deployed a basic php form on Heroku that inserts inputs into a database. When testing the code locally, using a local database/connection, the code works as intended. When trying to run the code on Heroku, the php script called as “action” in my form tag doesn’t seem to produce any results. I am […]

Why do git commands executed remotely affect the originating server?

I have a php script that runs on one server, which includes an exec() of an ssh command to another server. That ssh command runs a script which includes git commands. The git commands in the remote file, executed on the remote server, seem to be affecting the server that originated the ssh command, leaving […]

Auto Deployment On Git and Bitbucket using Hooks. Is It Secure, or Is there A Better Way?

I’m looking to use auto deployments on a new project using git and BitBucket. I’ve looked into using BitBuckets POST hooks and this seems to be a popular option, but I can’t find a lot of options currently, and I’m not sure about how secure this is: A far as I can see you have […]

Grab git commit ID from URL

I’m trying to parse an atom feed from Gitlab on my project to display a version history on my website. I do plan on caching my results per 30 minutes but right now I’m trying to extract the commit ID straight from the URL provided in the feed. The ID provided for the commit in […]

Composer dont init and update submodules

I’m making a composer library that have the following structure – vendor/ – src/ – data/ – cnab/ (Submodule: contains files that can be reused in other projects) – composer.json However when I require my library in other project, submodules are not started and updated. I tried to use composer scripts but no success: “scripts”: […]

Git workflow for web development test deployment

We are a very small team of 4 people working on the same web development project. We are using github for version control and are currently creating a new branch for each feature we are working on, then merging it back to ‘development.’ As of now we don’t have a graceful way to test our […]

Running git commands through php in a browser

Edit: I managed to get this working by printing out stderr via proc_open() then debugging with the information that was there. This is my first SO question so my apologies if it’s not in the correct format. I’m trying to run the following commands via php in my browser: git init git add * git […]

PhP Exec GIT command from crontab

I have a deploy script which i have to execute every time i change my config files. Which is a bummer. I tried to add the deploy script to my crontab, but from the logs i see that this command is failing in crontab because you are tehnically not in a git repo exec(‘git log […]

GIT repo in cPanel Home Directory

I’m trying to ensure that a GIT web hook I’ve written will still be usable for a site when the GIT repo itself is the user’s home directory in a cPanel server. In prior cases I’ve always had the repo in a directory below the home directory, which works fine since the pull/fetch is executed […]

Git Baby is a git and github fan, let's start git clone.