Forum: Ruby on Rails easy question on GIT

Posted by Cluter Vipic (cluter)
on 2013-02-08 01:07
Hi Folks,

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

MY QUESTION

if I have a commit for example

commit 9da53d968e8676a9d22d9fb57v56fef45426937cf
Author: Cluter <cluter@example.com>
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
changes

thank you in advance,

C
Posted by Greg Akins (akinsgre)
on 2013-02-08 01:20
(Received via mailing list)
Look at git rebase interactive
Posted by Johnneylee Rollins (Guest)
on 2013-02-08 03:14
(Received via mailing list)
Also, if it's the previous commit you can use `git commit --amend`

~Spaceghost
Posted by Colin Law (Guest)
on 2013-02-08 10:16
(Received via mailing list)
On 8 February 2013 02:13, Johnneylee Rollins
<johnneylee.rollins@gmail.com> 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.

Colin
Posted by pravin vaja (Guest)
on 2013-02-08 17:20
(Received via mailing list)
Hi,

Use git commit -m 'comment'
Posted by Cluter Vipic (cluter)
on 2013-02-20 22:22
thanks a lot for your useful answers

C
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.