Carl Worth <cworth@cworth.org> writes:I do not think you have to make it sound *that* negative. I agree it may be counterintuitive until the user groks the index. Let's assume that we will fix things to (1) require "--also" (or "--incremental") to get the current "git commit paths..." behaviour, (2) without any arguments we commit the index as is, (3) with explicit paths we commit clean HEAD plus only specified paths using a temporary index. I think a fairer way to say what you said would be: Always use -a, or explicit paths. With -a all of your changes in the working tree are committed. With paths, only changes to those paths are committed. Once you are comfortable with making commits this way, you might want to learn about index file and then start using 'git commit' without any argument. This works in a way that cannot be understood until you learn how the index file works, so stick to "-a or explicit paths" rule for now. That rule is good enough for everyday use. And you can probably go a long way without ever knowing about index. Initially when I wrote the above two paragraphs, I said "appreciated" instead of "understood". But depending on your workflow, you may not even need what "git commit" without arguments would give you, in which case there is nothing to appreciate about, so I changed the wording. Old-timer git people seem to like what it gives them but that does not mean everybody should marvel at what it does and adopt the workflow to take advantage of the index file. What that means is people should always do "git commit -a". Not even "git commit paths...". It matches _my_ sense of developer discipline, especially for individual developers, but it is a rather cumbersome straightjacket if enforced upon you in practice. It is a useful timesaver to be able to leave unrelated changes around in the working tree. I think I've already done this a couple of times today. Your "git diff" is interesting, but I'd rather make them completely separate command from "git diff". Perhaps "git ndiff" and "git ncommit", that assumes there is nothing but "git commit -a" kind of commits. - 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
| Mattia Dongili | Re: Linux 2.6.21-rc6 |
| Greg Kroah-Hartman | [PATCH 024/196] mtd: Convert from class_device to device for MTD/mtdchar |
| Renato S. Yamane | Error -71 on device descriptor read/all |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Mirko Stocker | Working with Git and CVS in a team. |
| Steffen Prohaska | Git-1.6.0.2-preview20080921 on Windows |
| Miles Bader | way to automatically add untracked files? |
| Tilman Sauerbeck | [BUG?] git log picks up bad commit |
| Brian A. Seklecki | sshd_config(5) PermitRootLogin yes |
| Jacob Yocom-Piatt | Re: Real men don't attack straw men |
| Parvinder Bhasin | BIND and CNAME-ing |
| Jerome Santos | sshd.config and AllowUsers |
| Patrick McHardy | pkt_sched: add DRR scheduler |
| ackman | RTL8169 driver no longer functioning with 8111b |
| Evgeniy Polyakov | [resend take 2 4/4] DST Makefile/Kconfig files. |
| Sami Farin | Linux 2.6.27.5 / SFQ/HTB scheduling problems |
| Kernel Panic when schedule is called | 1 hour ago | Linux kernel |
| VPN's on NetBSD | 15 hours ago | NetBSD |
| Why does uClinux 2.6.18 bootup block SuperIO UART IRQs that BIOS configured | 16 hours ago | Linux kernel |
| USB statistics | 17 hours ago | Linux kernel |
| Block Sub System query | 21 hours ago | Linux kernel |
| kernel module to intercept socket creation | 23 hours ago | Linux kernel |
| Image size changing during each build | 23 hours ago | Linux kernel |
| Soft lock bug | 1 day ago | Linux kernel |
| sysctl - dynamic registration problem | 1 day ago | Linux kernel |
| Question on swap as ramdisk partition | 1 day ago | Linux kernel |
