0

Good afternoon,

I'm trying to setup my VPS so it automatically pulls changes I've pushed to my BitBucket repo.

I've created a post-update script, given it executable flags, executed it manually to see if it does what I want (yes, it does, without an issue).

Now, the issue I'm having is - pushing to the repository doesn't force pull on my server.

Here's the script:

#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

cd ../../ || exit
unset GET_DIR
git pull

exec git update-server-info

The logs inside .git folder are empty.

kowsky
  • 12,647
  • 2
  • 28
  • 41
JTinkers
  • 1,631
  • 9
  • 18
  • Where is the hook, in the local repo or in the remote repo? It should be in the remote repo. When it receives pushes from other repos, the hook may be invoked. – ElpieKay Sep 07 '18 at 05:56
  • @ElpieKay it's in the repo on my VPS - I'm pushing changes from my local PC – JTinkers Sep 07 '18 at 11:48
  • This is confusing. "post-update" hook is a client side hook. Are you asking help for server-side hooks? So please fix your title to something matching a server side one, like "post-receive". – Lovato Sep 14 '18 at 15:41
  • @Lovato my server is technically a client, as it's meant to do 'git pull' from repository. – JTinkers Sep 15 '18 at 11:39

0 Answers0