Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8551907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:18:08+00:00 2026-06-11T14:18:08+00:00

Git does not allow me to switch branches in a clean working directory. Instead

  • 0

Git does not allow me to switch branches in a clean working directory. Instead it tells me a file in an ignored folder would be overridden.

$ git status
# On branch ECP-2229
nothing to commit (working directory clean)

$ git checkout ECP-2243
error: The following untracked working tree files would be overwritten by checkout:
        c.t.e.server.logback/bin/logback.xml
Please move or remove them before you can switch branches.
Aborting

There are hundreds of files in this and other bin/ folders in this working directory, all of them ignored.

$ cat .gitignore
bin

I assumed that the file would be already tracked somehow and tried to remove it, but

$ git rm c.t.e.server.logback/bin/logback.xml
fatal: pathspec 'c.t.e.server.logback/bin/logback.xml' did not match any files

What is wrong with this file and how can I convince git that it does not matter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:18:09+00:00Added an answer on June 11, 2026 at 2:18 pm

    For some reason someone tracked logback.xml, and you have an untracked version of this file. So git warns you that your untracked version will be overwritten by checkout, which is good, even if it is in .gitignore (who knows it doesn’t contain value?).

    You fail to git rm it because yours is untracked, so unknown to git, git rm only works on tracked or staged files.

    Instead just rm it and you’ll be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am behind a proxy that does not allow the use of git://. So
Does Git support any commands that would allow me to commit directly from a
git rebase does not appear to work properly in certain cases where a file
EDIT : Summary : Git does not allow dates before 1973/03/03 09:46:40 (epoch+100000000s) given
I just tried to install git-flow, however, it does not seem to be integrated
When git does a commit it rewrites binary files with something similar to rewrite
Does Git store text compressed with Gzip as binary files or can it tell
Does Git only use the remote name origin for a repository which was created
How does one revert a remote git repo after a reset done locally? We
A git tool that meets the specs below is needed. Does one already exist?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.