2017-05-09 17 views
0

gitプロジェクトでは、別のマシン。私はそれらの2つの異なるマシンで同じファイルを更新しました。 git pullで競合が発生します。だから私は、ファイルのgit checkoutを実行しようとすると、競合が発生しますが、ファイルのcheckoutは決して成功しません。マシンA上で作られた最後の更新B"git checkout - [リポジトリとファイル]" => "エラー:pathspec '[リポジトリとファイル]'がgitに既知のファイルと一致しませんでした。"

私がマシンにpullにしたい、とpushはgitリポジトリ支店masterにマシンAから-ed:

詳細に

。最終更新状況がファイルsrc/custom-pipes/my-pipe/my-pipe.tsで変更された場合、マシンB(同じリポジトリコンテンツで更新したいファイル)に同じファイルをいくつか変更しました。

ステップ1:マシンBから私はgit fetchを行う場合は、(as advised here to solve the issue I get in my title)とgit pull、私が取得:

error: The following untracked working tree files would be overwritten by merge:

src/custom-pipes/my-pipe/my-pipe.ts 

Please move or remove them before you can merge.

Aborting

ステップ2:私はマシンB上git statusを起動すると、私は取得:

On branch master

Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded. (use "git pull" to update your local branch)

Untracked files:

(use "git add ..." to include in what will be committed)

src/custom-pipes/my-pipe/ 

nothing added to commit but untracked files present (use "git add" to track)

ステップ3:をその後、私は、それをgit checkout -- "src/custom-pipes/my-pipe/my-pipe.ts"を起動(上記のように)、src/custom-pipes/my-pipe/my-pipe.ts.src/custom-pipes/.src/custom-pipes/my-pipesrc/custom-pipes/.:私は私が試した、打ち上げどのようなget checkout -- [something]

error: pathspec 'src/custom-pipes/my-pipe/my-pipe.ts' did not match any file(s) known to git.

:言います。もしmy-pipecheckoutであると言われていなければ、それは動作して何も言わない。 Iどのような場合は、私は戻ってステップ1に行くと、私はgit fetchgit pullを起動しようとした場合、後でそれがpullないとスロー

error: pathspec 'src/custom-pipes/my-pipe/my-pipe.ts' did not match any file(s) known to git. If my-pipe , my-pipe/. or my-pipe/my-pipe.ts is involved in the path to checkout.

error: The following untracked working tree files would be overwritten by merge:

src/custom-pipes/my-pipe/my-pipe.ts 

Please move or remove them before you can merge.

Aborting

をまたはそのようなエラーメッセージを投げます

アドバイスはありますか?

UPDATE:私はそれが競合を引き起こしていたのgit [リポジトリとファイル]なしを除去することで動作させることができました。その後、git pullはその後滑らかになりました。

答えて

0

gitを使わずに、[リポジトリとファイル]を削除して矛盾の原因となっているようにしました。その後、git pullはその後滑らかになりました。

関連する問題