I'm wondering what the best way to commit the removal of a file is. Let's assume that I have a file "foo" in my tree, that I have removed from my working tree (e.g. by using patch -E). git status shows: $ git status # On branch refs/heads/messages # Changed but not added: # (use "git add <file>..." to incrementally add content to commit) # # deleted: foo Ok, so I try to follow the instructions in the message: $ git add foo fatal: pathspec 'foo' did not match any files Ok, so that didn't work. Let's try rm instead: $ git rm foo fatal: pathspec 'foo' did not match any files Hm, something is wrong here. But hey, there's a -f option to rm that claims to prevent the "up-do-date check" $ git rm -f foo fatal: pathspec 'foo' did not match any files Finally, I have to resort to using update-index. $ git update-index --remove foo fatal: pathspec 'foo' did not match any files Since I believe that the idea is to move to an interface where you use e.g. "git add" instead of explicitly mentioning the index, I think this is bad. What could be the correct command for this situation. Some suggestions: $ git add foo $ git add --remove foo $ git rm foo $ git rm -f foo -- David Kågedal - 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
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| S.Çağlar | Rescheduling interrupts |
| J.A. | Linux 2.6.27-git3: rtl8169 oops and wireless missing symbols |
git: | |
| A Large Angry SCM | Notes on Using Git with Subprojects |
| Michael S. Tsirkin | git-kill: rewrite history removing a commit |
| Aubrey Li | git proxy issue |
| Luke Diamand | perforce import: git-p4 memory usage |
| mufurcz | Nvidia Quadro NVS 140M |
| Juan Miscaro | When will OpenBSD support UTF8? |
| Jeff Ross | U320 Drive on U160 controller? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jeff Garzik | Re: [PATCH] Add eeprom_bad_csum_allow module option to e1000. |
| Martin Willi | [RFC PATCH] xfrm: Accept XFRM_STATE_AF_UNSPEC SAs on IPv4/IPv6 only hosts |
| PJ Waskiewicz | [PATCH 3/3] ixgbe: Enable Data Center Bridging (DCB) support |
| David Miller | Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx() |
