Reputation: 15799
I'm attempting to use feature branches in Git, where I keep work on different features separate, and when a feature is done push it to the master branch.
I made a new feature branch, did some work, and used Eclipse to push a work-in-progress commit. In Eclipse I selected "Commit and push" and this dialog pops up:
I hit Preview then Push.
The problem is that the commit is now showing up in all my feature branches. If I go to github.com, switch to a feature branch other than the one I was working in, the commit is there! The files in that branch are changed and the commit shows up in the commit history. Oddly, the commit doesn't show up in the master branch.
What is going on here? Why isn't my commit confined to the branch I was working in?
Upvotes: 1
Views: 67
Reputation: 15799
It turns out that the other feature branches were created by someone else, and that someone created the branches based off my feature branch, not off master. So my work-in-progress commit was there in the other feature branches from the beginning. Unfortunately, it appears that Github doesn't provide enough information to make that clear.
Upvotes: 1