Note that there are some explanatory texts on larger screens.

plurals
  1. POGit clone fails due to untracked files but all branches are clean
    primarykey
    data
    text
    <p>I am attempting to clone a git repository. The clone fails with the following message: </p> <pre><code>Untracked working tree file ... would be overwritten by merge. </code></pre> <p>I have run <code>git clean</code> on all of the branches; none have untracked files.<br> The file which is labeled untracked is only used in the branch I am currently working in and it is tracked. </p> <p>Also, when I checkout the main branch and then checkout the branch I was originally working on, I the checkout succeeds but prints the name of the supposedly untracked file. Any ideas what this means?</p> <pre><code>Checking out files: 100% (477/477), done. M path-to-file-idenetified-as-untracked Switched to branch "Original_branch_name" </code></pre> <p>How can I get clone to work? </p> <p>I have read about cloning. I am making a clone because I want to share this with someone else who doesn't currently have the reposoitory.</p> <p>Here is what I entered, slightly edited. For example, I did several commands to cd, which are not shown. </p> <pre><code>$ git clone app.git clone/app.git Initialized empty Git repository in /cygdrive/c/clone/app.git/.git/ error: Untracked working tree file 'C:/app.git/include/template/foo.xml' would be overwritten by merge. $ git status # On branch GT nothing to commit (working directory clean) $ git rm include/template/foo.xml rm 'include/template/foo.xml' $ git commit -m "Removed include/template/foo.xml because clone was failing with the message untracked working tree file would be overwritten by merge " [GT]: created 77ca4ec: "Removed include/template/foo.xml because clone was failing with the message untracked working tree file would be overwritten by merge " 1 files changed, 0 insertions(+), 89 deletions(-) delete mode 100755 include/template/foo.xml $ git clone app.git clone/app.git Initialized empty Git repository in /cygdrive/c/clone/app.git/.git/ Checking out files: 100% (522/522), done. $ git commit -m "Added file deleted in previous commit after successfully cloning repository with file deleted" [GT]: created f3eb7e8: "Added file deleted in previous commit after successfully cloning repository with file deleted" 1 files changed, 89 insertions(+), 0 deletions(-) create mode 100755 include/template/foo.xml $ git clone app.git clone2/app.git Initialized empty Git repository in /cygdrive/c/clone2/app.git/.git/ error: Untracked working tree file 'C://app.git/include/template/foo.xml' would be overwritten by merge. </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload