Master and branch showing the same changes

Viewed 2550

I am still in the process of learning Git and when I felt I have mastered it all..I encounter a problem which makes me feel a novice again...

I have a master and a branch.For some 'God only knows' reason when I perform "Git status" on both the branches they are showing the same changes.

And when I commit these changes to one of them..I don't see them in the other..

Master*: Git status
On branch Master
Changes not staged for commit:
      modified:   Config/A.txt 
Untracked files:
       logs/B.txt


**Branch-1*: Git status**
On branch Branch-1
Changes not staged for commit:
      modified:   Config/A.txt 
Untracked files:
       logs/B.txt   

you be the God,for a while, :)

2 Answers

If you don't make a commit and you go to checkout master (or other branch) git will show you the same changes in both branch. But when you do the commit, these changes won't show for git in other branch, just in the branch where you are working.

Related