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

  • SEARCH
  • Home
  • 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 9244649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:05:18+00:00 2026-06-18T09:05:18+00:00

I have a project under git. In my gitignore file, I have a folder

  • 0

I have a project under git. In my gitignore file, I have a folder folder/ I don’t want git to care about. The problem, is each time I want to checkout a branch , I am asked to error: The following untracked working tree files would be overwritten by checkout:

error: The following untracked working tree files would be overwritten by checkout:
folder/somefile
folder/subfolder/somefile…

So I moved away the folder/, commited again and then took back the folder/ in my git repo. But why is this message always appearing ? (In my .gitignore, I have a line : folder/)

  • 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-18T09:05:19+00:00Added an answer on June 18, 2026 at 9:05 am

    You are getting this message, because you committed files that are inside folder/ before adding that folder to .gitignore.

    That means, although you have that folder in your .gitignore it already is inside your repository and thus will be checked out, just like all other files.

    .gitignore is used when checking files in, not when checking them out.

    If you want to remove folder/ from your git repository, you can do so by issuing the command git rm folder/.

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

Sidebar

Related Questions

In my project, have setup an admin panel under a folder inside controllers folder
I have a visual studio 2008 database project that is under version control (git).
I have a git repo for my work project. The software is still under
I have 5-10 independent projects that I want place under version control using Git.
I have a project which is under git version control. Everything works smoothly. I
I have a (large) Fortran project under Git. There are different active branches, corresponding
So, I have a project that was originally under git version control, The project
I have a Rails project under git. The structure is: SomeProject -Docs -Src -Rails
Say I've got a project under git version control. Within that project, I have
Short version: I have a Django project under development & testing (not yet into

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.