How to amend older Git commit? [duplicate]

I have made 3 git commits, but have not been pushed.
How can I amend the older one (ddc6859af44) and (47175e84c) which is not the most recent one?

$git log
commit f4074f289b8a49250b15a4f25ca4b46017454781
Date:   Tue Jan 10 10:57:27 2012 -0800

commit ddc6859af448b8fd2e86dd0437c47b6014380a7f
Date:   Mon Jan 9 16:29:30 2012 -0800

commit 47175e84c2cb7e47520f7dde824718eae3624550
Date:   Mon Jan 9 13:13:22 2012 -0800

6 Answers
6

Leave a Comment