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

June 14, 2018 132 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

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.
Have another answer? Share your knowledge.