user892134
user892134

Reputation: 3224

Git untracked files preventing checkout

I'm on the branch stage and i have capitalized all filenames, i want to checkout to branch develop but this error appears.

The following untracked working tree files would be overwritten by checkout:

application/controllers/cast_roles.php
        application/controllers/home_page_sliders.php
        application/controllers/invite_friend.php
        application/controllers/signup_page_movies.php
        application/controllers/special_users.php
        application/controllers/upload_media.php

These files are there but they've been capitalized.

e.g.

application/controllers/Cast_roles.php
application/controllers/Home_page_sliders.php

How do i solve? Is there a way to remove file case sensitive?

Upvotes: 5

Views: 5803

Answers (2)

akop
akop

Reputation: 7855

I was stuck at the same problem. For some files the capitalization was changed. These changes are commited, but git/IntelliJ are not able to switch between with and without the change.

At the end, I have always to do a git checkout theOtherBranch --force.

Upvotes: 0

Saugat Bhattarai
Saugat Bhattarai

Reputation: 2750

Remove untracked file and Do again:

git clean -f -d

Upvotes: 1

Related Questions