A perfect example of the sort of trouble I'm having with git just happened again. I have a public bare repo on my machine that I have cloned to make a private repo. I just want to sync my branches on my public and private repos. I do not want to merge across branches, I just want to "sync". So, here's what I did. In my private repo: % cat .git/remotes/origin URL: /repos/git/project Pull: refs/heads/master:refs/heads/origin Pull: refs/heads/topic:refs/heads/topic And this is the sequence of unfortunate events: Starting on topic branch: % git commit -a -m "Fix spacing rules" % git checkout master % git pull [Won't pull non-fast-forward on my topic, so I try to get that synced.] % git checkout topic % git push [ok, fine, seems good.] [Now, instead of remembering to move back to master, I do this:] % git pull Trying really trivial in-index merge... fatal: Merge requires file-level merging Nope. [AAAAGH!] Merging HEAD with 37e229835103a11365b1e081f9b9987a88437e62 Merging: e298e7f Skip rails in user nets 37e2298 Typofixen. [NO NO NO! This is not what I want!] found 1 common ancestor(s): a2ba736 Try #2: Fixed (mostly harmless) bugs in handling of time variable. Auto-merging src/ast/tstD.cc Auto-merging src/meth/XMLImporter.cc Auto-merging src/meth/XMLImporter.hh Auto-merging src/meth/tstXMLI.cc merge: warning: conflicts during merge CONFLICT (content): Merge conflict in src/meth/tstXMLF.cc Auto-merging src/nat/MacroFanLoader.cc Auto-merging src/nat/VPE.cc Auto-merging src/nat/PnDef.cc Auto-merging src/nat/VLExporter.hh Auto-merging src/nat/tstMod.cc Automatic merge failed; fix conflicts and then commit the result. Ok, now I'm hosed. Putting aside WHY git would do this to me (yes, I know the answer is that I asked for it), on my topic branch I now have tons of files listed when I do git status. git diff shows tons of stuff I don't want in my branch. So, I edit the file and "fix" the merge conflict, then realize that this is probably not what I want to do at all. So, 1) how do I get back to the status quo ante? I have about 30 files listed as "Updated but not checked in", then this: # Changed but not updated: # (use git-update-index to mark for commit) # # unmerged: src/methodic/tstXMLI.cc # modified: src/methodic/tstXMLI.cc which I don't want, as I just want them to go away... 2) Why does git pull do the right thing when on master, but seemingly changes behavior when on topic? I mean, the origin file seems to say update topic from topic. It says nothing about updating topic from master, which is what seems to have happened. When on master I get my desired "sync" behavior, but when on topic, it merges cross-branch... Bill - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html