#7
Dec 12, 2008
0 comments
Contributing to Rails with Git-用Git为Rails作贡献
If you want Rails to behave a certain way, try changing it and submitting a patch. This episode will show how to do exactly this using Git.
如果你想要Rails以特定方式运转,尝试改变它,并提交一个patch.这个视频讲述了如何正确使用Git.
# run tests rake test cd activerecord rake test_mysql rake test_mysql TEST='test/cases/named_scope_test.rb # make changes on branch git checkout -b named_scope_with_bang git commit -a -m "named_scope with bang" # pull recent changes and apply to branch git checkout master git pull git checkout named_scope_with_bang git rebase master # make patch git format-patch master --stdout > ~/named_scope_with_bang.diff # apply patch curl ... | git am create database activerecord_unittest; create database activerecord_unittest2; grant all on activerecord_unittest.* TO rails@localhost; grant all on activerecord_unittest2.* TO rails@localhost;

