ローカルで作業をするときに、
fuel/app/config/development/db.php
で設定を変更しました。
また、
http://qiita.com/maximum80/items/729af0392a84a3196088
で書かれているように、composerのアップデートを行いました。
その後にリモートの最新状態をpullしようとすると、
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
とgitに怒られてしまいます。
でも、ローカルでの開発用に設定しているファイルなので、この子達はコミットしたくありません。
そんな時の対処法です。
#1. git rm --cached ファイル名
まず、
$ git status
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: composer.phar
modified: fuel/app/config/development/db.php
と、ステージングをしていないファイルが2つあります。
これらのファイルの変更履歴をgitから削除しましょう。
$ git rm --cached fuel/app/config/development/db.php
$ git rm --cached composer.phar
これで、変更をしたという履歴がgitから削除されます。
#2. .gitignoreに指定のファイルを追記
.gitignoreは、
gitに無視をさせるファイル(変更をしても無視をする)ファイルを指定するファイルのことです。
$ vim .gitignore
.gitignore
/fuel/app/config/development/db.php
composer.phar
と、変更を無視したいファイルを追記すればオーケー。
$ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 131 and 1 different commit each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean
となっていれば完了。