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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Tvrtko A. Ursulin | Western Digital GreenPower drives and Linux |
git: | |
| Shawn O. Pearce | [BULLS**T PATCH] Allow Git to work at Insane Bank Corp |
| Michael Hendricks | removing content from git history |
| Eivind LM | Split a subversion repo into several git repos |
| Nicolas Pitre | Re: [PATCH] gc: call "prune --expire 2.weeks.ago" |
| Joachim Schipper | Re: OpenBSD/alpha Status |
| Cabillot Julien | Re: OpenBSD isakmpd and pf vs Cisco PIX or ASA |
| Marco Peereboom | Re: DELL PERC 5iR slow performance |
| Travers Buda | Re: Important OpenBSD errata |
| Rik Faith | ATI VGA WONDER driver for x386 |
| Mark Tarrabain | Some thoughts on device drivers |
| Karl J. Vesterling | Re: BYTE asks, is UNIX dead? |
| Linus Torvalds | Re: Copyright |
| SMDK2410 LCD Framebuffer driver | 2 hours ago | Linux kernel |
| Resetting the bios password for Toshiba Laptop | 3 hours ago | Hardware |
| Problem booting a barebone kernel in VMWare | 6 hours ago | Linux kernel |
| IP layer send packet | 10 hours ago | Linux kernel |
| PID to ELF image full path | 13 hours ago | Linux kernel |
| types of kernel | 1 day ago | Linux kernel |
| magical mounts | 2 days ago | Linux kernel |
| Problem in scim in Fedora 9 | 2 days ago | Linux general |
| The new Western Digital power saving drives | 2 days ago | Hardware |
| Battery Maximizer Software | 3 days ago | Linux kernel |
