How can I modify jira hash ticket id linked to my Commit after commit?

561 views Asked by At

I made a commit with Jira link issue but I made a mistake in the id of an issue so I wanna change it to the correct Jira link issue. any help

Update:

The propose of that question is to change the last commit message so to achieve that uses "git commit --amend" you can change the id of the issue or the entire message.

sorry for misleading question

1

There are 1 answers

0
Sajib Khan On BEST ANSWER

Try this:

$ git reset --soft HEAD~1         # undo last commit
# fix the link here

$ git add .
$ git commit -m 'Fix jira link'      
$ git push -f origin HEAD         # (-f) force push, replace the remote history by local