4

gitで差分が出続ける現象に悩まされています。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:   app/hoge.php
    modified:   app/fuga.css

no changes added to commit (use "git add" and/or "git commit -a")

stashしてもcommitしてもresetしても差分が出続けます。SourceTreeやGitHubのアプリケーションなどのGUIで操作しようとしても出続けます。

同様の現象に遭遇した方おりますでしょうか?

解決策の分かる方いらっしゃいましたらご教示いただけると幸いです。

1 件の回答 1

3
git add app/hoge.php
git add app/fuga.css
git commit -m "<your commit message>"

で解決しないでしょうか?

2
  • 3
    ありがとうございます。解決しました。 $ git add app/hoge.php warning: CRLF will be replaced by LF in app/hoge.php. となったのでググってこちらの記事のとおり以下のコマンドを打ったらコミットできました。 d.hatena.ne.jp/Kmizukix/20100106/1262711140 $ git config --global core.autoCRLF false $ git add app/hoge.php $ git config --global core.autoCRLF false $ git add app/fuga.css $ git commit -m "message" ありがとうございました! 2015年3月2日 11:35
  • 良かったです。尚、その警告についてですが、gitは元々Linuxの開発用に書かれたツールであるためか、Windowsの改行コードCRLFをLinux向け(LF)に書き換えようとするために起きているものです。既に書かれている通り、core.autoCRLFを設定するのが良いですね。
    – 3100
    2015年3月2日 11:45

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。