Re: Mysterious junk in file.... "not commited yet"

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Mysterious junk in file.... "not commited yet"

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:48:33

Howard Miller [off-list ref] writes:
Hmmm... fixed. I've never even heard of 'git add' before.
Hmm, maybe it's time to read the manual, then ;-).
Why is this different to plain old 'checkout' without the HEAD?
Read about the "index" of Git, aka "staging area". It's where Git (and
you) prepare commit, and "git diff" shows you the diff against it.
Plain "git checkout" will read from the index, while "git checkout
HEAD" takes the last commited version.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: Mysterious junk in file.... "not commited yet"

From: Howard Miller <hidden>
Date: 2016-06-15 22:48:33

Plain "git checkout" will read from the index, while "git checkout
HEAD" takes the last commited version.
Cool.... that's the bit I hadn't appreciated. I was (falsely) under
the impression that 'git checkout' grabbed the last committed version.
Suitably educated... thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help