From: Michael Witten Date: Fri, 19 Oct 2007 15:57:22 GMT Subject: Re: Proposed git mv behavioral change Message-ID: <9E5BD9E5-9027-4F92-8E32-BF78BA25321C@MIT.EDU> In-Reply-To: <28B30BAE-9482-4219-924B-F0EDFB2936FB@wincent.com> On 19 Oct 2007, at 7:33:39 AM, Wincent Colaiuta wrote: >> What you want to happen is the following: >> >> git show HEAD:A.txt > path/B.txt >> git add path/B.txt >> mv A.txt B.txt >> git rm A.txt >> >> Is this correct? > > Here you're copying the content of A.txt as it was in the last > (HEAD) commit, but from what the poster said he wants the content > of A.txt as it is staged in the index (that is, there may be staged > but uncomitted changes). > >> Better: >> >>> mv A.txt path/B.txt >>> Point the index entry for A.txt to path/B.txt > > Yes, that is basically what he was asking for, as I read it. You're right. There is the subtlety in the first case that he's already staged something.