Git Push from local repo to remote repo on a server for wordpress deployment -


despite finding minimal consistent documentation on topic, understanding when push git commit local repository remote repository on server (my remote repository on bluehost server) files compressed therefore, not visible on server in normal form.

one method used see these files "uncompressed" clone repository. trying use local repo , remote repo in workflow system maintain wordpress website. when push commit local repo remote repo, not able access site through browser. there additional step need take missing in order access uncompressed version of files through browser?

do have clone repository same folder after each push?

i have website on bluehost , simple set up. first need go cpanel , request ssh access.

then follow guide setting private key (stays on computer) , public key (goes in .ssh/authorized_keys on bluehost server).

http://git-scm.com/book/en/git-on-the-server-setting-up-the-server

i setup directory under home directory called git , setup test.git project. note i'm using ~/test working tree don't want push files www. you'll use ~/www.

*****@******.info [~]#  *****@******.info [~/git]# mkdir test.git *****@******.info [~/git]# cd test.git *****@******.info [~/git/test.git]# pwd /home1/******/git/test.git *****@******.info [~/git/test.git]# git init --bare initialized empty git repository in /home1/*******/git/test.git/ *****@******.info [~/www/test.git]# cd hooks *****@******.info [~/www/test.git]# vi post-receive 

the post-receive file:

#!/bin/sh git_work_tree=/home1/*******/test git checkout -f 

save file :x

*****@******.info [~/www/test.git/hooks]# chmod +x post-receive *****@******.info [~/www/test.git/hooks]# cd ~ *****@******.infoo [~]# git init test initialized empty git repository in /home1/*******/test/.git/ *****@******.info [~]# exit 

back on local machine:

[nedwidek@yule ~]$ git init test.git initialized empty git repository in /home/nedwidek/test.git/.git/ [nedwidek@yule ~]$ cd test.git [nedwidek@yule test.git]$ touch testfile.txt [nedwidek@yule test.git]$ git add . [nedwidek@yule test.git]$ git commit -m "testing" . [master (root-commit) 1d6697c] testing  0 files changed, 0 insertions(+), 0 deletions(-)  create mode 100644 testfile.txt [nedwidek@yule test.git]$ git remote add origin *****@******.info:/home1/*****/git/test.git [nedwidek@yule test.git]$ git push -u origin master counting objects: 5, done. writing objects: 100% (3/3), 270 bytes, done. total 3 (delta 0), reused 0 (delta 0) *****@******.info:/home1/*******/test.git    f144186..0fd10f8  master -> master branch master set track remote branch master origin. 

i checked , testfile.txt placed in ~/test/.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -