> I am looking for a way to automate "git commit --amend" ,my requirement is
> to  update the existing commit by replace a line ,I tried to change
> ".git/COMMIT_EDITMSG"
> but somehow the change doesn't reflect in the "git commit",how can this be
> autoamted?please advise

If I understand correctly what you're trying to do, you will wish to use
the `-m|--message` flag.

Steps for reproductions:

~~~
mkdir /tmp/testing
cd /tmp/testing
git init
printf "%d\n" $RANDOM >> README
x=0
git add README
git commit -m "Commit #$(( ++x ))"
git log
printf "%d\n" $RANDOM >> README
git add README
git commit -m "Commit #$(( ++x ))" --amend
git log # Notice how there is still only one commit.
~~~

~ Tim

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to