Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve untracked files message during eject #2797

Closed
ryouaki opened this issue Jul 15, 2017 · 11 comments
Closed

Improve untracked files message during eject #2797

ryouaki opened this issue Jul 15, 2017 · 11 comments

Comments

@ryouaki
Copy link

ryouaki commented Jul 15, 2017

> react-scripts eject

? Are you sure you want to eject? This action is permanent. Yes
This git repository has untracked files or uncommitted changes:

  ?? .gitignore,  ?? app.js,  ?? bee/,  ?? package-lock.json,  ?? package.json,  ?? views/

Remove untracked files, stash or commit any changes, and try again.

npm version is 5.0.3

@gaearon
Copy link
Contributor

gaearon commented Jul 15, 2017

Please follow the recommendation in the message.

Remove untracked files, stash or commit any changes, and try again.

For example you can run

git add .
git commit -am "Save before ejecting"

and then try again.

@gaearon gaearon closed this as completed Jul 15, 2017
@viankakrisna
Copy link
Contributor

I think the error message looks weird, what is it with all the ??

@ryouaki do you mind filling the issue template and tell us the terminal that you are using?

@gaearon
Copy link
Contributor

gaearon commented Jul 16, 2017

@viankakrisna I think ?? is what Git outputs for untracked files. It does look confusing though. Maybe we should output something better.

@gaearon gaearon reopened this Jul 16, 2017
@gaearon
Copy link
Contributor

gaearon commented Jul 16, 2017

Let’s keep it open and think how we can improve this message.

@ryouaki
Copy link
Author

ryouaki commented Jul 16, 2017

@gaearon thank you, you help me .it work now.

@Timer Timer changed the title When I run [npm run eject] ,I got this error Improve untracked files message during eject Jul 18, 2017
@Dubes
Copy link
Contributor

Dubes commented Jul 20, 2017

edit new to contributing to OSS, let me know if you would prefer a PR instead.

how about:

Your working directory is not clean. 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 either remove , stash or commit them before trying again.

Intention: Tell user what is the problem. Inform them why we are stopping. Tell them how they can check which files are stopping us. Give them a hint on how they can resolve it.

I used the word working directory even though current git status uses working tree as a personal preference, as I have seen some new users of git tend to get confused with the concept of tree.

I derived the context based on the discussion in PR 2090

@GabrielAmazonas
Copy link

Hi @gaearon! May I pick this one? Is anybody else working on it?
Big thanks in advance!

@Kobzol
Copy link

Kobzol commented Nov 11, 2017

This should really be overridable.. I have a repo with several projects combined and ejecting doesn't affect all of them, it's tedious that you have to manually remove the untracked files even though you know that the ejection won't collide with them.

@LannyCodes
Copy link

@gaearon @ryouaki @viankakrisna I just commited to the github casually,it work!

@Virako
Copy link

Virako commented Dec 20, 2017

echo "*" >> .gitignore
git commit -am "tmp"
npm run eject
git reset HEAD~1

@dustturtle
Copy link

why I got lots of file names not in the directory?

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants