error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java の原因と解決法
error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java の原因と具体的な解決手順をまとめました。
エラーメッセージ(全文)
error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java
このエラーとは
error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java は Git 開発でよく遭遇するエラーです。
想定環境: Windows / macOS / Linux
よく出る状況: ブランチ運用
よくある原因
- コンフリクト
- 保護ブランチ
- リモート不一致
解決方法
方法1: git diff
コンフリクトマーカーを確認.
それでも直らないとき
バージョン情報(Git のバージョン、OS、実行コマンド)を添えて、エラーメッセージ全文と直前に変更した点を確認してください。ログの数行上にも原因の手がかりが残っていることが多いです。
まとめ
「error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java」は コンフリクト が原因のことが多いです。上記の手順で切り分けてください。
次にやること
同じ Git カテゴリの関連エラーもあわせて確認してください。
よくある質問
error: The following untracked working tree files would be overwritten by che… とは何ですか?
error: The following untracked working tree files would be overwritten by checkout: src/app/Module153.java は Git 実行時に表示されるエラーです。コンフリクト
error: The following untracked working tree files would be overwritten by che… の原因は?
コンフリクト。保護ブランチ。リモート不一致。
error: The following untracked working tree files would be overwritten by che… の直し方は?
git diff:コンフリクトマーカーを確認.
Git で error が出るのはなぜ?
ブランチ運用
error: The following untracked working tree files would be overwritten by che… を防ぐには?
。
次に読むべき記事
- fatal: bad object refs/heads/release/154.0 の原因と解決法
- error: cannot lock ref 'refs/remotes/origin/hotfix/patch-155': unable to resolve reference の原因と解決法
- hint: You have divergent branches and need to specify how to reconcile them. branch: feature/task-156 の原因と解決法
- error: The following untracked working tree files would be overwritten by checkout: docs/guide-443.md の原因と解決法
- error: The following untracked working tree files would be overwritten by checkout: config/settings-433.yaml の原因と解決法
同カテゴリ「Gitエラー」の記事
- error: failed to push some refs to 'origin' (protected branch feature/task-448) の原因と解決法
- error: failed to push some refs to 'origin' (protected branch release/438.0) の原因と解決法
- error: failed to push some refs to 'origin' (protected branch feature/task-428) の原因と解決法
- error: failed to push some refs to 'origin' (protected branch release/418.0) の原因と解決法
- error: failed to push some refs to 'origin' (protected branch feature/task-408) の原因と解決法
- error: failed to push some refs to 'origin' (protected branch release/398.0) の原因と解決法
人気記事
- TS2307: Cannot find module '@components/Widget601' or its corresponding type declarations の原因と解決法
- TS2307: Cannot find module '@components/Widget591' or its corresponding type declarations の原因と解決法
- TS2307: Cannot find module '@components/Widget581' or its corresponding type declarations の原因と解決法
- TS2307: Cannot find module '@components/Widget571' or its corresponding type declarations の原因と解決法
- TS2307: Cannot find module '@components/Widget561' or its corresponding type declarations の原因と解決法
- TS2307: Cannot find module '@components/Widget551' or its corresponding type declarations の原因と解決法
学習ルート
体系的に学びたい方はこちらから。
エラー・トラブル集で続きを探す →あわせて読みたい
- error: The following untracked working tree files would be overwritten by checkout: docs/guide-443.md の原因と解決法同カテゴリの関連エラー
- error: The following untracked working tree files would be overwritten by checkout: config/settings-433.yaml の原因と解決法同カテゴリの関連エラー
- error: The following untracked working tree files would be overwritten by checkout: src/app/Module423.java の原因と解決法同カテゴリの関連エラー
- error: The following untracked working tree files would be overwritten by checkout: docs/guide-413.md の原因と解決法同カテゴリの関連エラー
- error: The following untracked working tree files would be overwritten by checkout: config/settings-403.yaml の原因と解決法同カテゴリの関連エラー