{"thread":{"id":"45148","subject":"how are \"untracked working tree files\" even possible in this case?","startedAt":"2017-02-15T20:36:56Z","lastAt":"2017-02-15T23:41:01Z","messageCount":4,"participants":["G. Sylvie Davies","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"311667","messageId":"CAAj3zPx6uP5WbA68Co0yX_yh-e5C+jze2T1hJ0NYS7hHBzgdqg@mail.gmail.com","threadId":"45148","inReplyTo":null,"subject":"how are \"untracked working tree files\" even possible in this case?","fromName":"G. Sylvie Davies","fromEmail":"sylvie@bit-booster.com","sentAt":"2017-02-15T20:36:50Z","receivedAt":"2017-02-15T20:36:56Z","isPatch":false,"sender":{"key":"sylvie@bit-booster.com","avatar":"https://gravatar.com/avatar/eb5bda7d3fb1e3361252bbf100d1f355ffe9ff8d8b559a08e4c7bc17d6f949d5?d=mp&s=160"},"body":"Hi,\n\nI have a script that runs the following sequence of commands within a clone:\n\n-----\n/usr/bin/git rebase --abort (took 148ms)\n/usr/bin/git cherry-pick --abort (took 103ms)\n/usr/bin/git clean -d -f -x (took 2007ms)\n/usr/bin/git reflog expire --expire=now --all (took 106ms)\n/usr/bin/git reset --hard --quiet\n181def85d58597dfb28729029b2ad76b9fbb09f5 -- (took 60103ms)\n/usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1\n(took 1795ms)\nErr: '/usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1'\nExit=128\nerror: The following untracked working tree files would be overwritten by merge:\n.gitignore\n\n[...many more files...]\n\nPlease move or remove them before you can merge.\nAborting\n-----\n\n\nI don't understand how untracked working tree files are possible after\n\"git clean -d -f -x\" and \"git reset --hard\" !\n\nI don't have access to this particular repo, but it's around 30GB when\ncloned (git directory plus working tree), and around 500,000 files in\nthe working tree when checked out.  Note:  the \"reset --hard\" takes 60\nseconds here.\n\n\n\n\n- Sylvie\n"},{"id":"311668","messageId":"CAAj3zPyz8m3nGC_897k9SJOmfqvC2VczxFyphabkDho34nuPUw@mail.gmail.com","threadId":"45148","inReplyTo":"CAAj3zPx6uP5WbA68Co0yX_yh-e5C+jze2T1hJ0NYS7hHBzgdqg@mail.gmail.com","subject":"Re: how are \"untracked working tree files\" even possible in this case?","fromName":"G. Sylvie Davies","fromEmail":"sylvie@bit-booster.com","sentAt":"2017-02-15T20:38:58Z","receivedAt":"2017-02-15T20:39:05Z","isPatch":false,"sender":{"key":"sylvie@bit-booster.com","avatar":"https://gravatar.com/avatar/eb5bda7d3fb1e3361252bbf100d1f355ffe9ff8d8b559a08e4c7bc17d6f949d5?d=mp&s=160"},"body":"On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies\n<sylvie@bit-booster.com> wrote:\n> Hi,\n>\n> I have a script that runs the following sequence of commands within a clone:\n>\n> -----\n> /usr/bin/git rebase --abort (took 148ms)\n> /usr/bin/git cherry-pick --abort (took 103ms)\n> /usr/bin/git clean -d -f -x (took 2007ms)\n> /usr/bin/git reflog expire --expire=now --all (took 106ms)\n> /usr/bin/git reset --hard --quiet\n> 181def85d58597dfb28729029b2ad76b9fbb09f5 -- (took 60103ms)\n> /usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1\n> (took 1795ms)\n> Err: '/usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1'\n> Exit=128\n> error: The following untracked working tree files would be overwritten by merge:\n> .gitignore\n>\n> [...many more files...]\n>\n> Please move or remove them before you can merge.\n> Aborting\n> -----\n>\n>\n> I don't understand how untracked working tree files are possible after\n> \"git clean -d -f -x\" and \"git reset --hard\" !\n>\n> I don't have access to this particular repo, but it's around 30GB when\n> cloned (git directory plus working tree), and around 500,000 files in\n> the working tree when checked out.  Note:  the \"reset --hard\" takes 60\n> seconds here.\n>\n>\n\np.s.  environment is:  Git-2.7.4 / Bitbucket-4.10.1 /\nLinux-4.4.0-59-generic (amd64)\n\n\n>\n>\n> - Sylvie\n"},{"id":"311669","messageId":"CAAj3zPz7swme+fXXyWhhObk8u+8TL2A_QLR-uHkMhGzAWUFCow@mail.gmail.com","threadId":"45148","inReplyTo":"CAAj3zPyz8m3nGC_897k9SJOmfqvC2VczxFyphabkDho34nuPUw@mail.gmail.com","subject":"Re: how are \"untracked working tree files\" even possible in this case?","fromName":"G. Sylvie Davies","fromEmail":"sylvie@bit-booster.com","sentAt":"2017-02-15T20:44:55Z","receivedAt":"2017-02-15T20:45:01Z","isPatch":false,"sender":{"key":"sylvie@bit-booster.com","avatar":"https://gravatar.com/avatar/eb5bda7d3fb1e3361252bbf100d1f355ffe9ff8d8b559a08e4c7bc17d6f949d5?d=mp&s=160"},"body":"On Wed, Feb 15, 2017 at 12:38 PM, G. Sylvie Davies\n<sylvie@bit-booster.com> wrote:\n> On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies\n> <sylvie@bit-booster.com> wrote:\n>> Hi,\n>>\n>> I have a script that runs the following sequence of commands within a clone:\n>>\n>> -----\n>> /usr/bin/git rebase --abort (took 148ms)\n>> /usr/bin/git cherry-pick --abort (took 103ms)\n>> /usr/bin/git clean -d -f -x (took 2007ms)\n>> /usr/bin/git reflog expire --expire=now --all (took 106ms)\n>> /usr/bin/git reset --hard --quiet\n>> 181def85d58597dfb28729029b2ad76b9fbb09f5 -- (took 60103ms)\n>> /usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1\n>> (took 1795ms)\n>> Err: '/usr/bin/git merge --squash 333def1a1513f84c1eb79e5341ed6ebca0d359a1'\n>> Exit=128\n>> error: The following untracked working tree files would be overwritten by merge:\n>> .gitignore\n>>\n>> [...many more files...]\n>>\n>> Please move or remove them before you can merge.\n>> Aborting\n>> -----\n>>\n>>\n>> I don't understand how untracked working tree files are possible after\n>> \"git clean -d -f -x\" and \"git reset --hard\" !\n>>\n>> I don't have access to this particular repo, but it's around 30GB when\n>> cloned (git directory plus working tree), and around 500,000 files in\n>> the working tree when checked out.  Note:  the \"reset --hard\" takes 60\n>> seconds here.\n>>\n>>\n>\n> p.s.  environment is:  Git-2.7.4 / Bitbucket-4.10.1 /\n> Linux-4.4.0-59-generic (amd64)\n>\n>\n\nAlso, one of the \"untracked files\" that shows up is called\n\".gitmodules\".    Could submodules be causing this?   (I have no\nexperience with submodules).\n\n\n>>\n>>\n>> - Sylvie\n"},{"id":"311704","messageId":"CAGZ79kYyzFwqmjO1kZSS0-ARrnk+mhooCPrP5oHiff_2piwvzQ@mail.gmail.com","threadId":"45148","inReplyTo":"CAAj3zPx6uP5WbA68Co0yX_yh-e5C+jze2T1hJ0NYS7hHBzgdqg@mail.gmail.com","subject":"Re: how are \"untracked working tree files\" even possible in this case?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-02-15T23:40:55Z","receivedAt":"2017-02-15T23:41:01Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies\n<sylvie@bit-booster.com> wrote:\n> Hi,\n>\n> I have a script that runs the following sequence of commands within a clone:\n>\n> -----\n> /usr/bin/git rebase --abort (took 148ms)\n> /usr/bin/git cherry-pick --abort (took 103ms)\n\nIs there more happening before?\n\n> /usr/bin/git clean -d -f -x (took 2007ms)\n> /usr/bin/git reset --hard --quiet\n\nI think the order is important:\n\n    git add <file> # add to the index\n    git clean -dfx # <file> is not untracked, hence not removed\n    git reset --hard # <file> is untracked now?\n\nSo I would expect reset before running clean would fix the problem?\n"}]}