---
title: "Adding an executable script and its folder to a site's Git repository"
date: "2025-02-06T01:29:02+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94141-adding-executable-script-and-its-folder-sites-git-repository"
id: "33499f0c-a8b4-478d-9edd-13b818f39ee9"
---

Situation
---------

This transcript shows how to add a directory containing an executable to a site's Git repository. In this example, the add-on is in a directory called the\_add\_on and the file that will be marked executable in the Git repository is the\_add\_on/connector.php:

    $ git checkout tag_on_prod -b myhotfix
    
    $ cp -r ~/Downloads/the_add_on/the_add_on .
    
    $ git add the_add_on/
    
    $ git ls-files --stage the_add_on/
    100644 bbb458a7243f906c2175ae97aceb29df519394f6 0   the_add_on/.htaccess
    100644 a8ae2efe8f8be133a9099974661c3272987f9092 0   the_add_on/connector.php
    100644 fcb5d272a86e08924bd8b19b20b877e03e8bd562 0  the_add_on/readme.html
    
    $ git update-index --chmod=+x the_add_on/connector.php
    
    $ git ls-files --stage the_add_on/
    100644 bbb458a7243f906c2175ae97aceb29df519394f6 0   the_add_on/.htaccess
    100755 a8ae2efe8f8be133a9099974661c3272987f9092 0   the_add_on/connector.php
    100644 fcb5d272a86e08924bd8b19b20b877e03e8bd562 0   the_add_on/readme.html
    
    $ git commit -m "Adding the_add_on directory to docroot"
    [myhotfix 677beee7] Adding the_add_on directory to docroot
     3 files changed, 3622 insertions(+)
     create mode 100644 docroot/the_add_on/.htaccess
     create mode 100755 docroot/the_add_on/connector.php
     create mode 100644 docroot/the_add_on/readme.html
    
    $ git push -u origin myhotfix
    Enumerating objects: 9, done.
    Counting objects: 100% (9/9), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (7/7), done.
    Writing objects: 100% (7/7), 22.97 KiB | 7.66 MiB/s, done.
    Total 7 (delta 2), reused 3 (delta 0)
    To svn-1234.devcloud.hosting.acquia.com:theclient.git
     * [new branch]        myhotfix-> myhotfix
    Branch 'myhotfix' set up to track remote branch 'myhotfix' from 'origin'.
    $