2016-12-09 18 views
1

後に変更があります。私はすぐに変更をコミットする必要がGitのリポジトリは、このレポをクローニングした後、右クローン

https://github.com/OpenFOAM/OpenFOAM-3.0.x

./git/configファイルのtextmodecrlfautoを変更するという共通の解決策を使用して修正しようとしました。私も.gitattributesファイルを試しました。しかし、これは行末の問題ではありません。私は実際にコードを変更しました。

は、ここに私の手順と出力されます:私もそれらの変更をコミットしようとしてい

[email protected]  ~/dev  git clone https://github.com/luiscruz/OpenFOAM-3.0.x.git 
Cloning into 'OpenFOAM-3.0.x'... 
remote: Counting objects: 49097, done. 
remote: Total 49097 (delta 0), reused 0 (delta 0), pack-reused 49097 
Receiving objects: 100% (49097/49097), 59.70 MiB | 2.29 MiB/s, done. 
Resolving deltas: 100% (30768/30768), done. 
Checking connectivity... done. 
Checking out files: 100% (13863/13863), done. 
[email protected]  ~/dev  cd OpenFOAM-3.0.x 
[email protected]  ~/dev/OpenFOAM-3.0.x   master ●  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: applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C 
    modified: applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H 
    modified: applications/test/Dictionary/Make/files 
    modified: applications/test/Dictionary/Make/options 
    modified: applications/test/Dictionary/Test-Dictionary.C 
    modified: src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H 
    modified: src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.C 
    modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H 
    modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C 
    modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H 
    modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.C 
    modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H 
    modified: src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C 
    modified: src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H 
    modified: src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C 
    modified: src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H 
    modified: src/OpenFOAM/meshes/MeshObject/MeshObject.C 
    modified: src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H 
    modified: src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H 
    modified: src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H 
    modified: src/finiteVolume/finiteVolume/fvc/fvcDDt.C 
    modified: src/finiteVolume/finiteVolume/fvc/fvcDDt.H 
    modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C 
    modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H 
    modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrads.C 
    modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C 
    modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H 
    modified: src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.C 
    modified: src/fvOptions/sources/general/codedSource/CodedSource.C 
    modified: src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C 
    modified: tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/B 

no changes added to commit (use "git add" and/or "git commit -a") 
[email protected]  ~/dev/OpenFOAM-3.0.x   master ●  

が、それは動作しません。

git version 2.10.1 Mac OS X 10.10.5

私のGitの設定:

git config -l 
core.excludesfile=~/.gitignore 
core.legacyheaders=false 
core.quotepath=false 
core.pager=less 
mergetool.keepbackup=true 
push.default=simple 
color.ui=auto 
color.interactive=auto 
repack.usedeltabaseoffset=true 
alias.s=status 
alias.a=!git add . && git status 
alias.au=!git add -u . && git status 
alias.aa=!git add . && git add -u . && git status 
alias.c=commit 
alias.cm=commit -m 
alias.ca=commit --amend 
alias.ac=!git add . && git commit 
alias.acm=!git add . && git commit -m 
alias.l=log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset' 
alias.ll=log --stat --abbrev-commit 
alias.lg=log --color --graph --pretty=format:'%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative 
alias.llg=log --color --graph --pretty=format:'%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)' --abbrev-commit 
alias.d=diff 
alias.master=checkout master 
alias.spull=svn rebase 
alias.spush=svn dcommit 
alias.alias=!git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\  => \2/' | sort 
include.path=~/.gitcinclude 
include.path=.githubconfig 
include.path=.gitcredential 
diff.exif.textconv=exif 
credential.helper=osxkeychain 
user.name=Luis Cruz 
[email protected] 
credential.helper=osxkeychain 
push.default=simple 
core.repositoryformatversion=0 
core.filemode=false 
core.bare=false 
core.logallrefupdates=true 
core.ignorecase=true 
core.precomposeunicode=true 
core.autocrlf=true 
remote.origin.url=https://github.com/luiscruz/OpenFOAM-3.0.x.git 
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* 
branch.master.remote=origin 
branch.master.merge=refs/heads/master 

のgit diffの抜粋:

-#include "InterfaceCompositionModel.H" 
+#include "interfaceCompositionModel.H" 
#include "phaseModel.H" 
#include "phasePair.H" 
-#include "pureMixture.H" 
-#include "multiComponentMixture.H" 
-#include "rhoThermo.H" 

-// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // 
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // 

私はレポのクローンを作成することを勧めます:

git clone https://github.com/luiscruz/OpenFOAM-3.0.x.git 
+0

私の推測では、マシン上でgitのEOLをローカルに定義する方法に関係していると思います。 * git config -l *の出力やあなたが持っているOSなどの詳細を追加できますか? – yorammi

+0

あなたのリクエストで@yorammi –

+0

の質問を編集しました。core.ignorecase = trueの問題がある可能性があります。 core.precomposeunicode = true core.autocrlf = true特に無視するケース – yorammi

答えて

0

このリンクはあなたに役立ちますGit refuses to reset/discard files

これは主にMac、Liunx、Windows用の異なる改行の原因です。

+0

何かをコミットしたり追加したりする必要はありません。私がレポをクローンするとき、私はコミットするために何の変更もせずにレポを取得する必要があります。 –

+0

よろしくお願いします。誤解して申し訳ありません。あなたは 'git config --global core.autocrlf input'を試すことができます。 –

+0

@LuisCruz、私はちょうど私の答えを更新し、おそらくあなたを助けるリンクを共有しました。あなたの問題を解決できるかどうか確認してください。 –

0

これらは、パスは大文字小文字のみが異なる2つのファイルがありhttps://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H

https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H比較します。あなたのMacOSXはおそらく大文字と小文字を区別しないファイルシステムを持っています。

私はそれが意図的なものではなく、何らかの間違いがあると言います。そこから回復しようとするいくつかのオプションがありますが、最初に公式リポジトリを確認することをお勧めします:http://www.openfoam.com/code/repositories.phpと同じ問題がある場合はそれを参照してください。

+0

私が言及したレポは公式レポのきれいなフォークです:[https://github.com/OpenFOAM/OpenFOAM-3.0.x](https://github.com/OpenFOAM/OpenFOAM-3.0.x)あなたはそれを回復するためにどのようなオプションをお勧めしますか? –

+0

公式レポはgithubのものではありません。最初に確認する – max630

+0

このリポジトリを使用する必要がある場合は、https://stackoverflow.com/a/25023912/2303202に記載されているように、競合するディレクトリをチェックアウトからスキップする必要があります。たぶんあなたは 'core.ignorecase'を' false'に設定して、疎なチェックアウトを検討する必要があります。私は確信していませんが。 – max630

関連する問題