#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    694
    Rep Power
    95

    Git: writing data form repository


    I am new to git and I have installed a client on two computers and I am able to manage changes to the git repository from either computer. I see the diffs and I am happy so far. I have a website that we manage the data through git but my question has to do with writing the data from the git repository back to public_html. Can I write the data from the git to public_html using git or do I have to write a bash script myself that will do that?

    Thanks,
    Evan
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    I don't really understand your question. public_html can be a git repository if you want. Then you can either push to it from other repositories, or pull to it from another repository.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    694
    Rep Power
    95
    You are correct but the git repository is not in public_html. They are separate and I need to copy the data to public_html once its committed.

    Does git have a command to do that?

    Thanks
    Evan
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    You'll probably need to write a script to do it.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    694
    Rep Power
    95
    Is it a good idea to have the git repository be at the same place as the public_html?
    Evan

IMN logo majestic logo threadwatch logo seochat tools logo