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

error: the following files have changes staged in the index #4

Closed
webjay opened this issue Dec 25, 2014 · 4 comments
Closed

error: the following files have changes staged in the index #4

webjay opened this issue Dec 25, 2014 · 4 comments

Comments

@webjay
Copy link

webjay commented Dec 25, 2014

I'm getting this error from the command git --work-tree dist rm -r '*', would you recommend --cached or -f?

error: the following files have changes staged in the index
(use --cached to keep the file, or -f to force removal)

My guess is that it is caused by the branch having existed previously?

Btw, thanks for a great script. I use it at journster.com

@webjay
Copy link
Author

webjay commented Dec 25, 2014

Actually, I think this is caused by me running --setup after I make changes.

@webjay webjay closed this as completed Dec 25, 2014
@X1011 X1011 added the question label Jan 13, 2015
@X1011
Copy link
Owner

X1011 commented Jan 15, 2015

Ah, ok. there actually is a check for uncommitted changes, but it currently doesn't apply to setup. i'll fix that.

thanks for the kind words. i'm glad to see my little script getting around.

@X1011 X1011 reopened this Jan 19, 2015
@X1011 X1011 closed this as completed in ba250e3 Jan 19, 2015
@raine
Copy link

raine commented Jun 27, 2015

I had this issue as well.

I had to remove dist, do ./deploy.sh -s then add a dummy dist folder with .gitignore to gh-pages and make a commit. After that ./deploy.sh would work in master.

Basically, ./deploy.sh --setup wouldn't work if I had the untracked dist folder in master.

@X1011
Copy link
Owner

X1011 commented Jul 6, 2015

hi @raine. if i understand correctly, when you try to run the setup while you have a dist/ folder that's not .gitignore'd, you get an error about untracked files. this sounds like a separate issue. i'll open another issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants