{"thread":{"id":"50933","subject":"Supporting untracked files with `git pull --autostash`","startedAt":"2019-04-14T18:20:15Z","lastAt":"2019-04-14T18:20:15Z","messageCount":1,"participants":["mqudsi@neosmart.net"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"373822","messageId":"0101016a1d14099f-4ac42e38-256a-42a2-94d3-430417d74a25-000000@us-west-2.amazonses.com","threadId":"50933","inReplyTo":null,"subject":"Supporting untracked files with `git pull --autostash`","fromName":"","fromEmail":"mqudsi@neosmart.net","sentAt":"2019-04-14T18:20:13Z","receivedAt":"2019-04-14T18:20:15Z","isPatch":false,"sender":{"key":"mqudsi@neosmart.net","avatar":"https://gravatar.com/avatar/c2643dd7c6df61aed49d9f3d917ac6d61cafbbda5f9b1619f50d3b749dca415a?d=mp&s=160"},"body":"Hello,\n\nJust a quick request for an enhancement to the behavior of the following\ncommand:\n\n    git pull --autostash --rebase\n\nWhen executed with local, untracked files that would conflict with newly-added\nfiles upstream, e.g.\n\nAn untracked local file `master:/foo` would be overwritten by a recently tracked\nfile `origin/master:/foo`.\n\nCurrently, the following occurs:\n\n```\nmqudsi@devpc > git pull --autostash --rebase\nFirst, rewinding head to replay your work on top of it...\nerror: The following untracked working tree files would be overwritten by\ncheckout:\n        tests/eval.err\n\t\ttests/eval.in\n\t\ttests/eval.out\n```\n\nwhere\n\n```\nmqudsi@devpc > git status --porcelain=v2 | grep eval\n? tests/eval.err\n? tests/eval.in\n? tests/eval.out\n```\n\nAs currently `--autostash` only applies to files that are tracked by git, and\nfiles not in the index are ignored.\n\n(Additionally, with this change it makes sense to enable `--autostash` to be used\nwith a plain `git pull` without necessary also including `--rebase`, but I can\nlive without it!)\n\nThank you,\n\nMahmoud Al-Qudsi\nNeoSmart Technologies\n\n\n"}]}