php - How do I configure a Debian webserver for push Git repo on it? -


i working in php developer team , have debian linux web server in local area network , installed lamp on it.

so ok until planned using git version control system , use in our team work. our scenario when push git repository linux server, website hosted on takes effects , in our lan network can access this:

192.168.1.100/mysite 

every thing ok, can pull server , push it!
problem when access website on server mysite folder in /var/www didn't take effect.

i've searched internet , find should have bare repository connected master repository. i'm new git , don't know how it.

edited: if possible tell me how on gui, have sourcetree.anything else ok.

if launching project first time on server, have clone first. suppose trying launch this repo github account. have this:

  1. go directory. is: /var/www
  2. run commant: sudo git clone https://github.com/eaiman/bitmaphandler.git

if console saying git not command or this, have install first.

install git: run command: sudo apt-get install git

you done. project pulled /va/www/ directory.

after that,

  1. when made change in project. first push changes git local pc.
  2. then login server
  3. go /var/www/ directory
  4. run command: sudo git pull origin master. master branch name. use branch want pull from. suppose have 2 branch. 1. master 2. dev-shoshi. can run this: sudo git pull origin master or this: sudo git pull origin dev-shoshi command

hope help. let me know if have question.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -