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-pipe
、src/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-pipe
がcheckout
であると言われていなければ、それは動作して何も言わない。 Iどのような場合は、私は戻ってステップ1に行くと、私はgit fetch
とgit 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/.
ormy-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
はその後滑らかになりました。