ユーザ用ツール

サイト用ツール


git:publishing

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
git:publishing [2011/10/01 18:26] – 作成 nullpongit:publishing [2024/10/17 16:03] (現在) nullpon
行 8: 行 8:
 ===== サーバ側準備 ====== ===== サーバ側準備 ======
  
-  * サーバ  example.paulownia.jp +  * サーバ  example.com 
-  * リポジトリ /var/git/example.paulownia.jp.git +  * リポジトリ /var/git/example.com.git 
-  * ドキュメントルート /var/www/example.paulownia.jp/htdocs+  * ドキュメントルート /var/www/example.com/htdocs
  
 公開用のリポジトリを作る 公開用のリポジトリを作る
  
-  $ cd /var/git/example.paulownia.jp.git+  $ cd /var/git/example.com.git
   $ git init --bare   $ git init --bare
  
 フックスクリプト(post-receive)を有効にして修正、以下の1行を追加。 フックスクリプト(post-receive)を有効にして修正、以下の1行を追加。
  
-  env GIT_WORK_TREE=/var/www/example.paulownia.jp/htdocs git checkout -f +  env GIT_WORK_TREE=/var/www/example.com/htdocs git checkout -f 
  
  
行 26: 行 26:
 ウェブディレクトリをgit管理下におく ウェブディレクトリをgit管理下におく
      
-  $ cd example.paulownia.jp/htdocs+  $ cd example.com/htdocs
   $ git init    $ git init 
      
 remoteリポジトリを追加(名前は何でも良いがoriginという名前にはしない方がいいだろう、ここではwebserverにした) remoteリポジトリを追加(名前は何でも良いがoriginという名前にはしない方がいいだろう、ここではwebserverにした)
  
-  $ git remote add webserver ssh://nullpon@example.paulownia.jp/var/git/example.paulownia.jp.git+  $ git remote add webserver ssh://nullpon@example.com/var/git/example.com.git
  
 webserverにpushする。 webserverにpushする。
git/publishing.1317493590.txt.gz · 最終更新: 2011/10/01 18:26 by nullpon