Post Commit Hooks Script to automate server

In this Video we will Create a local git repository (using git init) in a new directory and will also create a hook file named "post-commit" in .git/hooks/. 

Inside this Post Commit file we will create a command or script that will open a web page immediately after a commit is performed to that repo.

We will also install the Apache web servers using commands :

sudo apt-get update
sudo apt-get install apache2

The script we will use is

#!/bin/bash
unset GIT_INDEX_FILE
git --work-tree=/var/www/html --git-dir=/home/demo/proj/.git checkout -f 
How to trigger a Jenkins build job using a hooks/post commit script

How to trigger a Jenkins build job using a hooks/post commit script

How to trigger a Jenkins build job using a hooks/post commit script


Git deploy to staging server using post-receive hook

Git deploy to staging server using post-receive hook

Git deploy to staging server using post-receive hook


023 Introduction to Git Hooks

023 Introduction to Git Hooks

023 Introduction to Git Hooks


Git Deploying a Website

Git Deploying a Website

Git Deploying a Website


gated-commit with git pre-commit

gated-commit with git pre-commit

gated-commit with git pre-commit


Git Hooks Tutorial - Auto Deploy on Push

Git Hooks Tutorial - Auto Deploy on Push

Git Hooks Tutorial - Auto Deploy on Push


Git Hooks

Git Hooks

Git Hooks


Git Hooks Part 1 - Getting Started

Git Hooks Part 1 - Getting Started

Git Hooks Part 1 - Getting Started


Git Hooks Demonstration

Git Hooks Demonstration

Git Hooks Demonstration