-1

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

esso
  • 125
  • 3
  • 16

1 Answers1

1

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
Sajib Khan
  • 22,878
  • 9
  • 63
  • 73