Re: Query on git commit amend
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Dec 7, 2011, 04:53 UTC
- Message-ID
- <20111207045325.GA22990@atjola.homenet>
- In-Reply-To
- <4EDEE988.2070902@st.com>
On 2011.12.07 09:50:24 +0530, Viresh Kumar wrote:
Show 24 quoted lines
> > Thanks guys. This whole session was new to me. > > On 12/7/2011 7:58 AM, Vijay Lakshminarayanan wrote: > > Junio C Hamano <gitster@pobox.com> writes: > > > >> > Vijay Lakshminarayanan <laksvij@gmail.com> writes: > >> > > >>> >> I've found > >>> >> > >>> >> $ GIT_EDITOR=cat git commit --amend > >>> >> > >>> >> useful. > >> > > >> > Are you sure it is a cat? > > Yes. > > This didn't worked for me. Got following error: > > cat: unrecognized option `--amend' > Try `cat --help' for more information. > error: There was a problem with the editor 'cat git commit --amend'. > Please supply the message using either -m or -F option. > Could not commit staged changes.
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.
HTH Björn