2016-09-06 4 views
0

は、私たちが上演および/または変更されたファイルを見てみましょう:Gitチェックアウト - いくつかのファイルが選択されたファイル(複数可)をリセットしていないダブルダッシュ

$git status 

On branch master 
Your branch is up-to-date with 'origin/master'. 
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: .gitattributes 
    modified: .gitignore 

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

はのは、変更をロールバックしようとしてみましょう:最初に.gitattributesで始まります:

15:52:22/ $git checkout -- .gitattributes 
15:52:40/$git status 
On branch master 
Your branch is up-to-date with 'origin/master'. 
Changes not staged for commit: 

    modified: .gitattributes 
    modified: .gitignore 
+0

ではありませんでしたか? –

答えて

0

原因は、Windows CRLFベースのファイルを* Nix(macos)にプルしています。 CRLFはLFに自動的に変換されていますが、それはファイルに対して「編集」を行います。 git checkoutも同じ更新が行われます。

私はCRLFの問題を避けるために、今どのように把握する必要がありますが、いずれにしても問題があなたの `.gitattributes`ファイルの中身は何checkout --

関連する問題