Skip to content

Instantly share code, notes, and snippets.

@vsl-iil
Created October 18, 2024 21:00
Show Gist options
  • Save vsl-iil/62607fc247a12b424e0c59520e1fdc45 to your computer and use it in GitHub Desktop.
Save vsl-iil/62607fc247a12b424e0c59520e1fdc45 to your computer and use it in GitHub Desktop.
post-receive-pull
# Переименуйте файл в post-receive, сделайте исполняемым и поместите в директорию hooks удалённого репозитория (git init --bare)
# Путь до репозитория:
REPO="/home/example/repo"
# Имя удалённого репозитория (например, origin)
REMOTENAME=server
# Имя ветки
BRANCH=master
cd $REPO
GIT_DIR="$(pwd)/.git"
git pull $REPO $BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment