I've switched the branch that I was working from 'master' to a 'stable' branch, made my modifications and commited/pushed to that branch. Switched back to 'master' and started to implement a new feature to the software. But when I tried to add my modifications, only the files that was modified or deleted appeared to be added to the repository. The new ones that I've created simply didn't show up!
So I copied all the files to a new location in my computer, switched the branch to the 'stable' again and for my surprise there was my new files! I deleted the files to make sure that no modification was made in that branch, switched back to 'master', copied the files from my backup and no new file appeared.
I've already made this a thousand times, and this was the first time that this happened. I use SourceTree, but for this I've tried the git bash too (which I don't have much knowledge about).
What happened? Why my new files are 'attached' to the 'stable' branch? How can I fix this?
Thanks in advance.
Update:
I've made a clone of the same repository in another folder to see if things work, but I had no success. The problem still happens.