Skip to content

aadityataparia/Auto-git-pull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Auto-git-pull

Do git pull on push event to a repo

How to use it

  1. Install git cli tools on your server, eg. sudo apt-get install git for ubuntu
  2. Upload git.sh, onetime.sh, git.php to your server web directory or any web directory you want to sync, eg. /var/www/html for apache.
  3. set owner of all the files to user which run the server (eg. www-data for apache) and set file permission to 750!
  4. Run onetime.sh #{https git url} from shell once as superuser
  5. Set webhook in your repo for push event to git.php location
  6. You are done, now everytime there is a push event on your repo, server will automatically pull from your repo.
  7. You can add other commands in git.sh file which you would like to execute after pulling, like starting a server etc.

About

Do git pull on push event to a repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published