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 8670663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:45:43+00:00 2026-06-12T18:45:43+00:00

Git checkout/pull doesn’t remove directories? I’m kind of new to git and slowly learning

  • 0

Git checkout/pull doesn’t remove directories?

I’m kind of new to git and slowly learning various parts of it.

So forinstance I have a branch

Master with FolderA

I have later from Master created a branch

Dev and added FolderB

So Dev as result have FolderA and FolderB

now when I do git branch master, I’m assuming folder B should be deleted.

But I see FolderB as unstaged folder in master, as I understand it should be removed.

Further more, if I go ahead, when in branch Dev deleting FolderA, when changing branch

to master and back to Dev FolderA appears unstaged in branch Dev.

So why is git not deleting these folders? should I always do some sort of clean command like git clean -f -d?

Or what am I missing?

My real scenario is much more complicated however this simple example should cover the problem I’m experiencing at a larger scale.

Just to be clear:
This questions is about content of the branch, it is not concerned with folders only. However the answer is similar to another question pointed out here, but the questions is different.

  • 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-12T18:45:44+00:00Added an answer on June 12, 2026 at 6:45 pm

    Although Git manages the files within your folders, it doesn’t delete the folder itself when switching to a branch where the folder isn’t needed. Don’t worry about it, you’re not missing anything.

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

Sidebar

Related Questions

I have created branch with git checkout -b mybranch. It seems that something went
I have a branch called experiment. git checkout master echo 'some changes' > a.txt
I'm new to git so please feel free to RTFM me... I have multiple
I'm fairly new to Git, and have been working with it for only 3
Suppose I was on master branch and created a new branch: git checkout -b
I am pretty new to git. I have been primarily checking stuff into a
Overview: $ git pull ... time passes ... $ git checkout topic # remote
After a pull, git status tells me that I have changed a 16Mb xml
I use git checkout -b somebranch origin/somebranch to make sure my local branches track
I basically want to do: git checkout branchA git checkout -b branchB <commit_id> which

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.