Easy question on GIT

Hi Folks,

I have a question unfortunately on the net didn’t find a simple answer
to my simple question


if I have a commit for example

commit 9da53d968e8676a9d22d9fb57v56fef45426937cf
Author: Cluter [email protected]
Date: Thu Feb 7 15:42:37 2013 -0800

and after I change again the code how can add to the same commit the new

thank you in advance,


Look at git rebase interactive

Also, if it’s the previous commit you can use git commit --amend


On 8 February 2013 02:13, Johnneylee Rollins
[email protected] wrote:

Also, if it’s the previous commit you can use git commit --amend

But I recommend only to amend the previous commit if you are certain
that nothing has happened in between. For example if you have pushed
to the master repository and then amend you may run into problems. It
is ok if you commit, realise almost immediately that you missed
something and so amend it, but for anything else do another commit.



Use git commit -m ‘comment’

thanks a lot for your useful answers


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs