git拾遗

April 21, 2014

把一直以来零星的收集到的一些git相关的东西划拉到一起

彩色的 git 输出:

git config color.ui true

checkout指定分支的指定文件

git checkout <your_branch> -- <your_file>

pull一个remote分支

git checkout -b <new_branch> origin/<new_branch>
git pull

删除remote分支

git push origin --delete <branchName>

push 之前修改commit

git reset HEAD^
修改代码
git commit -am "xxxxxx"    

在ActiveAdmin下自定义filter

rails4之后,之前的`model`里加入`search_methods :filter_name`的做法已经失效,需修改为:``` ruby class PromoCode (ids) { with_tags(ids) } def self. …… Continue reading

Mac上搭建Phonegap环境

Published on October 02, 2014

Rails遗留程序里最常犯的错误(译)

Published on July 23, 2014