Title: Git version 1.7.1
Last modified: August 22, 2016

---

# Git version 1.7.1

 *  Resolved [ToreKarlsson](https://wordpress.org/support/users/torekarlsson/)
 * (@torekarlsson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/)
 * Hello!
 * I can’t get this plugin to start working. I have a git in the same folder as 
   my WordPress installation. All files got RWE permissions. Could the problem be
   that I’m stucked with git version 1.7.1?
 * My shared hosting company uses Cloudlinux and therefore I’m kind of stuck with
   Gt v1.7.1 is it possible to get this plugin working with this version?
 * I’m able to add files and commit them when I’m logged in to the server via SSH.
 * Best regards
    Tore
 * [https://wordpress.org/plugins/revisr/](https://wordpress.org/plugins/revisr/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664077)
 * Hi,
 * What’s going wrong with the plugin? Are you getting any errors?
 *  Thread Starter [ToreKarlsson](https://wordpress.org/support/users/torekarlsson/)
 * (@torekarlsson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664078)
 * Just to explain a little further:
 * I get the plugin up and running, I then head over to Dashboard and wait for the
   loading to complete and then get: “Thanks for installing Revisr! No Git repository
   was detected, click here to create one.”
 * I click “Click here” and get this in the log:
    “Failed to initialize a new repository.
   Please make sure that Git is installed on the server and that Revisr has write
   permissons to the WordPress install.”
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664215)
 * Hi,
 * Can you try running this manually via SSH? It looks like this is where it’s getting
   tripped up:
    `git rev-parse --show-toplevel`
 * Let me know what that says. Thanks!
 *  Thread Starter [ToreKarlsson](https://wordpress.org/support/users/torekarlsson/)
 * (@torekarlsson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664250)
 * Hello!
 * I run `git rev-parse --show-toplevel` in my public_html folder (the same folder
   that holds my WordPress installation).
 * And it returned: /storage/content/6*/135***/vindpust.com/public_html
 * (Asterisks is my account number at the hosting company.)
 *  Thread Starter [ToreKarlsson](https://wordpress.org/support/users/torekarlsson/)
 * (@torekarlsson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664390)
 * Hello!
 * I found a solution, I’m sorry but I don’t have the time to explain it right now.
   I will try to give you a update (maybe it can help someone else?) this weekend.
 * /Tore
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664404)
 * Hi Tore,
 * Glad you got it figured out. Please do share the fix when you have a moment in
   case it helps anyone else in the future or if it’s something I can try to account
   for in the plugin. Thanks!
 *  Thread Starter [ToreKarlsson](https://wordpress.org/support/users/torekarlsson/)
 * (@torekarlsson)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/git-version-171/#post-5664421)
 * I got some spare time:
    How I fix the problem:
 * My hosting company already got Git installed below my own website. When I sign
   in via SSH and run different commands everything works great. But when revisr
   tries to execute exactly the same commands it returns error code 127 (no command
   found). I was able to install a new version of Git (2.2.0) but when I run commands
   via SSH they are still executed on the old Git.
 * My solution
    Revisr tries to get a path via “`git parse res ––show–toplevel`”
   but this only returns my public_html path and could not execute any commands.
   My solution was to force the plugin to execute via my new installation. I changed
   the path from: “/storage/content/6*/13****/vindpust.com/public_html/” to my new
   git “/storage/content/6*/13****/bin/git “ (this is where Git 2.2.0 is located
   on my server).
 * I made this changed on three places in the class-revisr-git.php file:
    function
   current_dir()
 *     ```
       public function current_dir() {
       $dir = exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel' );
       		if ( $dir ) {
       			return $dir;
       		} else {
       			return ABSPATH;
       		}
       	}
       ```
   
 * function is_repo()
 *     ```
       public function is_repo() {
       exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel', $output, $error );
       		if ( $error ) {
       			return false;
       		} else {
       			return true;
       		}
       	}
       ```
   
 * function run()
 *     ```
       public function run( $command, $callback = '', $args = '' ) {
       		// Run the actual Git command.
   
       		$cmd = ( "/storage/content/62/135262/bin/git $command" );
       		//$cmd = escapeshellcmd( "git $command" );
       		$dir = getcwd();
       		chdir( $this->dir );
       		exec( $cmd, $output, $error );
       		chdir( $dir );
       		// If using a callback, initiate the callback class and call the function.
       		if ( $callback != '' ) {…
       ```
   
 * And now everything works!
 * Is it possible that you can add a source box for the git installation? Like the
   one to the database in further updates? That would help me alot!
 * Thank you!
 * If something is strange or missing just post a comment!
 *  [sivakumarp](https://wordpress.org/support/users/sivakumarp/)
 * (@sivakumarp)
 * [11 years ago](https://wordpress.org/support/topic/git-version-171/#post-5664561)
 * Hi, I installed revisr plugin and configured my project git url and necessary
   information. When I am creating branch on my revisr it’s throwing error saying,
   Warning: in_array() expects parameter 2 to be array, boolean given …..
    Can any
   one please let me know where I am wrong and please let me know how to use revisr
   plugin for database visioning. Thanks in advance
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years ago](https://wordpress.org/support/topic/git-version-171/#post-5664563)
 * [@sivakumarp](https://wordpress.org/support/users/sivakumarp/) Can you please
   open a separate thread with the full copy/paste of the error you got? The file
   and line numbers in the error should help out a bunch.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Git version 1.7.1’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revisr_ecf0f1.svg)
 * [Revisr](https://wordpress.org/plugins/revisr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/revisr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/revisr/)
 * [Active Topics](https://wordpress.org/support/plugin/revisr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revisr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revisr/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/git-version-171/#post-5664563)
 * Status: resolved