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?