Re: Query on git commit amend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks guys. This whole session was new to me.

On 12/7/2011 7:58 AM, Vijay Lakshminarayanan wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
> 
>> > Vijay Lakshminarayanan <laksvij@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]