• ブログ
  • Photoshare
  • キーワード
  • ブックマーク
  • ふぉとす
  • 写真
  • ログイン

kaeruspoon

« かえるイメージもちょっと改良 | ガンダム帰還 »
  • Railsアプリをgitで管理するときのやり方 2008-05-18 23:37:03 Append 479

    新規にRailsアプリを作るときのgitでの管理の仕方について自分メモ。

    1.Railsアプリの作成

    $ rails testapp
    $ cd testapp
    

    2.ローカルレポジトリの作成とRailsアプリのコミット

    $ git init
    $ git add .
    $ git commit
    

    3.ログファイルを無効にする

    $ rm log/*.log
    $ git commit -a
    

    log/.gitignoreファイルに以下の行を書き込んで保存する。

    *.log
    

    それからコミット

    $ git add log/.gitignore
    $ git commit -a
    

    4.tmp以下のファイルほ無効にする
    tmp/.gitignoreファイルを作成し、以下の行を書き込む。

    *
    !.gitignore
    

    そしてコミット

    $ git add tmp/.gitignore
    $ git commit -a
    

    5.database.ymlの無効化

    $ cp config/database.yml config/database.example.yml
    $ git add config/database.example.yml
    

    config/.gitignoreファイルを作成し、以下の行を追加。

    database.yml
    

    コミット

    $ git add config/.gitignore
    $ git commit -a
    


    こんな感じです。

    Commentコメント(0) Pageリンク元(1428)
« かえるイメージもちょっと改良 | ガンダム帰還 »

プロフィール

おおいしつかさ

過去の記事

2006年
12月
2007年
1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月
2008年
1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月
2009年
1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月
2010年
1月 2月

キーワード一覧

ActionScript Ajax AmazonResources Erlang git github iPhone javascript Javascript Kaerukeyword kaeruspoon Mac merb milook MiyazakiResistance NSR Objective-C perl Perl Rails Ruby Ruby on Rails RubyKaigi speedpetal subversion Thin Thinkpad tokyobike TRPG twitter ubuntu Ubuntu VAIO VAIO typeZ Waves WordScoop Xen ぐりぐり しろさん カンタロー スノボー ドトール ドライブ バイク プログラミング ユルさん 執筆 宮崎 日本酒 模型 猫 町田 真中洋嗣 自転車
Baner