フロントエンドデベロッパーのメモ

スキル: HTML/Jade/Jinja2, CSS/SCSS, JavaScript(ES6), Angular, React,Next, Redux, Node, Express, Python, Flask, Postgres, Redis, MongoDB, Kafka, Knex, SQLAlchemy, React Native, EXPO, GraphQL/Apollo, REST, AWS, Heroku, Docker, CircleCI, SCRUM, XP, Vim, TDD

error .babelrc: already exists in working directory

f:id:morita657:20180803213417p:plain

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