Re: Separating "add path to index" from "update content in index"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <junkio@xxxxxxx> wrote:
> And it is not just limited to adding the contents of a path that
> happened to be told git for the first time.  Adding the contents
> of a path that was known to git also happens only when it is in
> a presentable good state.  So running "git diff" and not seeing
> what I added before is a GOOD THING.

Yes!

Sadly it has taken me 12 months of working with Git to get
comfortable enough with that concept.

Actually it clicked once I realized that 'update-index' was actually
creating the blobs in the ODB and not 'write-tree'.  Prior to that
"click" going off in my grey matter I always felt that Git screwed
up when I did:

	$ vi foo.c
	$ git update-index foo.c
	$ git diff
	# what the ? where are my changes?

I now make quite heavy use of the index even when hacking on code,
and not just during merges.  But I wasn't like that just 5 months
ago...

-- 
Shawn.
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]