I'll preface this by saying I'm relatively new to git, and I'm leaning on the Eclipse git GUI probably more than I should. Anyway, here's what happened:
- I created a remote branch from origin/master and checked out that branch.
- Another developer checked in a change to master. The change doesn't compile on my system, for complicated reasons.
- I did a
git pullthis morning, while checked out on my branch, and the changes to master were brought into my workspace.
So now the non-working versions of certain files are in my workspace, even though I branched before those changes were checked in. This is a bit of a surprise.
Could someone help me understand why git is importing these changes while I'm branched, and how to control this behavior? At the least, I'd like to revert the files that don't compile to earlier versions, and prevent git from merging additional changes from master into my branch until I'm ready to merge back into master. Ideally, I'd like to bring in some of the changes made by the other developer, because some files in the project are very difficult to merge.
Here is the git config for my copy of the repository. I'm on MYBRANCH:
[core] symlinks = false repositoryformatversion = 0 filemode = false logallrefupdates = true [remote "origin"] url = ssh://email@example.com:7999/foo/bar.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [branch "SOMEOTHERBRANCH"] remote = origin merge = refs/heads/master [branch "MYBRANCH"] remote = origin merge = refs/heads/master