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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:24:28+00:00 2026-05-31T22:24:28+00:00

I’ve created a bare git repository (Core), cloned from a pre-existing repo (Production) using

  • 0

I’ve created a bare git repository (“Core”), cloned from a pre-existing repo (“Production”) using gitflow. I’ve cloned that bare repo again into a non-bare repo (“Staged”), then re-initialized git flow in Staged (because it seems that gitflow didn’t come across when I cloned the bare repo?)

But I’ve just noticed something odd. Let’s say I am in the staged repo, on the develop branch, and edit a text file (test.txt). I run git status and it tells me that test.txt has been modified. Awesome.

Now, I do not commit or merge, but I checkout master using git checkout master, then I run git status again and it says that test.txt has been modified!

Correct me if I’m wrong, but any changes I make on the develop branch should not effect the master branch at all right? This leads me to believe that my “master” branch and “develop” branch are actually the same branch.

Clearly I’ve made an extremely silly mistake somewhere along the line, but where? No idea. Has this happened to anyone before? Any pointers on diagnosing the issue here? Does any silly mistake that I could have made spring to mind to anyone?? Is there a remedy?

(I’d like to point out that I do, in fact, need a develop and master branch)

Update
After committing changes on my develop branch, the result is that master does, in fact, return to it’s correct state and that develop is now in the updated state. I’m starting to feel that perhaps this is just how git behaves?

  • 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-31T22:24:30+00:00Added an answer on May 31, 2026 at 10:24 pm

    With git, there are three important areas: the repository (where all versions are kept), the staging directory, and the working directory. The staging directory is where you stage your changes before you commit (or where files go when you issue “git add” commands). The working directory is the set of files you see in your checked out repository.

    Branches are simply pointers to repository snapshots. When you swap the active branch, git tries to preserve changes in the staging and working areas, and change all the files in the working directory to the snapshot pointed by the branch. If it cannot do this safely, it tells you to stash your changes. I haven’t experimented with staging area conflicts, because I tend to commit the contents of the staging area before I swap branches.

    In your particular situation, you modified your working directory, then swapped branches. Since the modifications are not committed (or added to staging area), when you change your branch, git simply reverts the working directory to the master branch, and preserves your uncommitted changes. This allows you to commit the changes to a different branch if you want to.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

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.