Git

概要

  • hooksに関するメモです。
  • 随時更新していきます

git pushしたらhookで別のディレクトリへデプロイする手順

別のディレクトリ

$ mkdir 別のディレクトリ
$ cd 別のディレクトリ
$ git init

bareリポジトリ

$ cd bareリポジトリ/.git/hooks/
$ vim post-receive
--- 
cd 別のディレクトリ
git --git-dir=.git pull bareリポジトリのパス master
---
$ chmod u+x post-receive

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-06-30 (木) 01:40:11