既存ファイルをインポートして共用リポジトリを作る

共用リポジトリの作成

 mkdir -p /var/git/repos/project1.git
 cd /var/git/repos/project1.git
 git init --bare --shared

既存ファイルのインポート

 cd /home/taro/tmp
 touch sample.txt
 git init
 git add .
 git commit -m 'import'

共用リポジトリにpush

 git remote add origin file:///var/git/repos/project1.git
 git push origin master

個人用作業リポジトリの作成

 cd /home/taro/work
 git clone file:///var/git/repos/project1.git project1

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2012-05-01 (火) 17:03:27