[hibernate-dev] Change commit messages?
Steve Ebersole
steve at hibernate.org
Thu Jan 12 17:58:36 EST 2012
Thanks Sanne. I actually found that the progit book has a section
dedicated to this process. I was able to ammend them.
steve at hibernate.org
http://hibernate.org
On Jan 12, 2012 4:22 PM, "Sanne Grinovero" <sanne at hibernate.org> wrote:
> Also if you don't feel comfortable in doing such operations on an
> important branch, consider using
>
> git checkout -b [newBranchName]
>
> first, so you get a clone of the branch where you can safely play
> with, or eventually checkout the original branch and start over clean.
>
> Sanne
>
> On 12 January 2012 22:17, Sanne Grinovero <sanne at hibernate.org> wrote:
> > Hi Steve,
> > assuming you are in the repository and have checked out the branch you
> > want to edit, type:
> >
> > git rebase -i HEAD~2
> >
> > This will open up an editor, showing two lines: the last commit on the
> > bottom and the previous one above it.
> > change the "pick" keyword to "r" as the reminder suggests in the
> > commented area of the file itself.
> >
> > Save the file and exit the editor; another editor will be opened to
> > allow you to edit the commit message.
> >
> > The "2" in the command above can be replaced with an higher number to
> > allow you to edit the sequence and commit details of a longer history.
> > For example to change the sequence of commits, just move the order of
> > the lines in the file. To remove a commit from the history, delete a
> > line.
> >
> > There very likely is some clever shortcut to edit just the last commit
> > but don't remember it now :)
> >
> > Cheers,
> > Sanne
> >
> > On 12 January 2012 21:58, Steve Ebersole <steve at hibernate.org> wrote:
> >> Anyone know how to change commit messages? Trying to merge in a pull
> >> request where they did not reference the jira key in their commit
> messages
> >>
> >> --
> >> steve at hibernate.org
> >> http://hibernate.org
> >> _______________________________________________
> >> hibernate-dev mailing list
> >> hibernate-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list