Re: Query on git commit amend
- From
- Viresh Kumar <viresh.kumar@st.com>
- Date
- Dec 7, 2011, 04:20 UTC
- Message-ID
- <4EDEE988.2070902@st.com>
- In-Reply-To
- <87wra9und4.fsf@gmail.com>
Thanks guys. This whole session was new to me.
On 12/7/2011 7:58 AM, Vijay Lakshminarayanan wrote:
Show 12 quoted lines
> 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.
>> > I almost always use >> > >> > $ EDITOR=: git commit --amend
Even this didn't worked for me:
error: pathspec '.git/COMMIT_EDITMSG' did not match any file(s) known to git. error: There was a problem with the editor 'git commit --amend'. Please supply the message using either -m or -F option. Could not commit staged changes.
Only "true" worked for me.
Probably, i have an older version of git (version 1.7.2.2)
One more thing. I couldn't get completely how this worked. Maybe any pointers to earlier discussions.
The way i am testing it is: - Stop after a commit in middle of rebase using "edit" or "e" option - set EDITOR or GIT_EDITOR - change files - git add changed_files - git rebase --continue
-- viresh