Tu Hoang Do <[email protected]> writes:
> I tried amending with magit by pressing 'c' and then 'a' (for
> amend'), but instead of amending it creates two commits: an unpulled
> and unpushed commit of the same name. I just want to amend, how can I
> make magit ammend like regular amend command on terminal?
It did what you wanted.
When git amend a commit, it do not change the old one, but create a new
one, including the modified part.
If you had already pushed the commit you now amend, then you have two
diverted branch
-- * -- Original commit (on the server)
\
\-- Amended commit (locally)
The original commit is still on the server, and is then seen by magit as
been unpulled, and the amended commit is not (yet) on the server, and is
seen by magit as unpushed. You can now force push to change what is on
the server.
It's generally believed you should not amend or rebase commit you had
already pushed, because if someone has already pulled the commit you
amend, he won't easily integrate you new change.
--
Rémi Vanicat
--
You received this message because you are subscribed to the Google Groups
"magit" 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.