0

I've committed a ticket on branch xy123 with comment "xy124:fixed the issue" in Git. JIRA displays only the created branch xy123 details not the committed files details but the committed files details are in branch xy124.

Now I want to edit or remove the comment on Git. How to do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Sathish Chelladurai
  • 670
  • 1
  • 8
  • 23
  • 1
    possible duplicate of [Edit an incorrect commit message in Git](http://stackoverflow.com/questions/179123/edit-an-incorrect-commit-message-in-git) – RomanHotsiy Jul 22 '14 at 14:46

1 Answers1

1

You can do an interactive rebase locally:

git rebase -i HEAD~3 (if the commit you want to edit is 3 commits behind), then mark it as r for reword, and change the commit message.

Once you've done that, you can do a git push --force origin xy123 "origin" being your remote's name.

I'm not sure if JIRA will get updated on your particular setup.

Miguel
  • 159
  • 1
  • 3