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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:49:08+00:00 2026-05-27T04:49:08+00:00

I have a tracked file (an old versioned file) that i modified on master

  • 0

I have a tracked file (an old versioned file) that i modified on master branch.
The staus on master branch shows this file as modified but
The status on the topic branch also shows this file as modified.

Earlier there was an error “error: You have local changes to “X”; cannot switch branches” when i checkout to the other branch without doing a stash or without using “-f” in git-checkout.

i have checked “stackoverflow.com/questions/1304626/git-switch-branch-and-ignore-any-changes-without-committing” but that error doesnt occur and am able to checkout even when i have local changes.

Is there any kind of config that is causing this confusion?

  • 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-05-27T04:49:09+00:00Added an answer on May 27, 2026 at 4:49 am

    It looks like the branch you’re switching to is in the same state as the branch you’re coming from. Each branch is a pointer on a tree of commits. Therefore, if two branches point to the same set of commits , you can switch between them without checking in local changes. The reason is that until you actually commit the changes, it does not make a difference to git which branch you commit them to. However, once you have commit the change, then one branch has it and the other one does not and their histories are now different.

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

Sidebar

Related Questions

I have a tracked database (already added) file in git. I want this file
Basically I have an XML file that looks like this: <?xml version=1.0 encoding=UTF-8?> <data>
TL;DR: I have a tracked branch that I can't pull. So here I am
We have a file that we need to be tracked in our Git repository.
REVISED QUESTION : We have tracked this down to a custom add to cart
I have several apps with tracked .rvmrc's in Git. Problem is, I have this
It seems like I have inadvertently modified my git config such that when I
I have a simple user production report where daily quotas are tracked. The sql
We have/had a phantom delay in our app. This was traced to the initialisation
I have a file with database settings in my project which I have set

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.