Created by: Dubes
This attempts to improve the message shown to user when ejecting on a git repo having untracked changes ( Issue: https://github.com/facebookincubator/create-react-app/issues/2797 )
Proposed message
Your git working tree is dirty. This will make it hard for you to resolve any unintended consequences eject may have on your changes. Please use
git status
to verify the changed files, then eitherremove
,stash
orcommit
them before trying again.
Message break down:
- state the root cause
- state why this is not allowed
- hint for the user to identify files causing problems
- hint for the user towards action they can commit
I did not list the files (as was done previously) as that may lead users to more confusion (why is CRA having problem with this file etc.), instead tell the users how they can find it.