how to directly connect git repository to server , so if change on repository it directly change in server also

Posted June 14, 2018 14.4k views

i do not want to change files in the server all time when I change in my repository. if i commit on git repo then it will reflect in server also

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

You could setup a CI/CD pipeline from a repo site such as Github and/or Gitlab. Another solution is to use git hooks

by Justin Ellingwood
Git is a very robust and mature version control system that has seen great adoption in recent years. One of git's great features is its ability to use "hooks" to call arbitrary scripts when certain git events occur. In this guide, we'll discuss the general idea behind git hooks, talk about how to work around some of its inconsistencies, and demonstrate some implementations that you can use in your development process.