error .babelrc: already exists in working directory
git format-patch
で作成パッチファイルを作成した。ボスにメールに添付して送る前にgit applyで開こうとするもこのエラーに出くわしてしまいました。 エラー内容はすでにファイルがディレクトリにありますよとのこと。 こちらとしてはすでに存在するファイルを上書きしてほしいものの、git applyのデフォルトではそれができません。 上書きを強制するためには、git applyのオプションである--rejectが必要です。このオプションをつけることによって、デフォルトでエラー引き起こしてしまうところを上書きを可能にします。
git apply [file path] --reject
So today, I faced on a brand new error message after making a path with
git format-patch [file path]
and trying to check by myself before sending.
The error means that the file already exists and I cannot overwrite the current existing file.
To solve this issue, you need the option --reject
not to invoke error message while applying. The solution that I found is
git apply [file path] --reject