2014年10月31日 星期五

github branch co-work

create a new branch from the branch develop

$ git checkout -b myFeature dev
Creates MyFeature branch off dev. Do your work and then
$ git commit -am "Your message"
Now merge your changes to dev without a fast-forward
$ git checkout dev
$ git merge --no-ff myFeature
edit
Now push changes to the server
$ git push origin dev
$ git push origin myFeature



http://stackoverflow.com/questions/20101994/git-pull-from-master-into-the-development-branch

git pull from master into the development branch


git checkout dmgr2      # gets you "on branch dmgr2"
git fetch origin        # gets you up to date with origin
git merge origin/master



conflict 修改完後
git add [file]
git commit


取消已暫存的檔案

git reset HEAD <file>
看目前的 branch 與其他 branch 有哪些差異,你可以使用 git diff 的指令去觀察,例如我現在想要看 master 跟 cat 這兩個 branch 的差異,我只要下:
$ git diff cat master

2014年10月22日 星期三

setting local server on yosemite

http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/


to start it
sudo apachectl start
to stop it
sudo apachectl stop
to restart it
sudo apachectl restart
To find the Apache version
httpd -v
cd /etc/apache2/users
sudo nano username.conf
Then add the content below swapping in your ‘username’ in the code below:


Permissions on the file should be: permission checking ls -la
-rw-r--r--   1 root  wheel  298 Jun 28 16:47 username.conf
If not you need to change…
sudo chmod 644 username.conf
sudo nano /etc/apache2/httpd.conf
And make sure these 3 modules are uncommented (the first 2 should be on a clean install):
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
And also uncomment this configuration file also in httpd.conf
Include /private/etc/apache2/extra/httpd-userdir.conf
Then open another Apache config file and uncomment another file:
sudo nano /etc/apache2/extra/httpd-userdir.conf
And uncomment:
Include /private/etc/apache2/users/*.conf
Restart Apache for the new file to be read:
sudo apachectl restart

2014年10月21日 星期二

RoR setting ref.

安裝可以參考下面兩個網頁

https://www.railstutorial.org/book/beginning
看 1.1 1.2 即可

https://github.com/rocodev/guides/wiki/setup-mac-development
只需要這幾個就可 系統套件 安裝 XQuartz ImageMagick / MySQL 安裝 RVM 與 Ruby 2.0



get repo. from github for ror
>git clone git@github.com:Project/project.git [A public project of github]
->cd project
->bundle install
->rake db:migrate
->rails server