From: Viresh Kumar Date: Wed, 07 Dec 2011 05:45:10 GMT Subject: Re: Query on git commit amend Message-ID: <4EDEFD66.4020404@st.com> In-Reply-To: <20111207045325.GA22990@atjola.homenet> On 12/7/2011 10:23 AM, Björn Steinbrink wrote: > That looks like you did something like: > export GIT_EDITOR="cat git commit --amend" > > But the original command was: > GIT_EDITOR=cat git commit --amend > > Notice that there are no quotes and no escaped spaces. This is a > shortcut to set GIT_EDITOR to "cat" for just this one command (git > commit --amend). > > If you want to set the editor in the environment, use just "export > GIT_EDITOR=cat" or something like that. Ok. Got it now. Now, whats the benefit of GIT_EDITOR=cat git commit --amend over git commit --amend -C HEAD ? Obviously if we have more than one commit to handle during a rebase then, setting editor to cat once, would be good. As now we don't really need to do git commit --amend. We can add commits and continue rebase. But for single commit probably second one looks easier. Isn't it? Or maybe the latest patch from Junio is even better. -- viresh