6.

The following untracked working tree files would be overwritten by checkout

編集

エラー内容

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

    .... file_name

Please move or remove them before you can switch branches.

Aborting

 

発生条件/原因/対処法

パターン1: 「git status」で Untracked files が出た場合で、対象ファイルを削除してもいい場合

git clean -n」もしくは「git clean -dn」(ディレクトリバージョン)を実行して削除対象のファイル/ディレクトリを確認する。

確認ができたら、「git clean -f」もしくは「git clean -df」で削除する。

 

編集
Post Share
子ページ

子ページはありません

同階層のページ
  1. fatal: remote origin already exists.
  2. fatal: '~' does not appear to be a git repository
  3. Cannot rebase: You have unstaged changes. Please commit or stash them.
  4. remote: error: denying non-fast-forward refs/heads/master (you should pull first)
  5. error: pathspec ... did not match any file(s) known to git.
  6. The following untracked working tree files would be overwritten by checkout
  7. fatal: Not a valid object name: 'master'.
  8. Unlink of file 'ファイル名' failed. Should I try again? (y/n)
  9. Another git process seems to be running in this repository, ~
  10. error: Your local changes to the following files would be overwritten by checkout: