i want to change my commit messages, where i am following the so link
i gave below command to change my older and multiple commits
git rebase -i HEAD~n
but i am getting below error
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
i am not sure, why i am getting this error, where i need to change my commit message before pushing to bitbucket, not intended to stash or commit them .
i have 8 commits, which needs to be pushed.
EDIT :-
git status
$ git status
On branch dev
Your branch is ahead of 'origin/dev' by 8 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: ABC.log
modified: src/test/java/com/elastic/nftqa/TestqaApplicationTests.java
Untracked files:
(use "git add <file>..." to include in what will be committed)
.settings/
no changes added to commit (use "git add" and/or "git commit -a")
Git push
remote: Push rejected.
remote:
remote: refs/heads/dev: f5b0790e1d5: No Jira Issue found in commit message
remote:
remote: refs/heads/dev: 8f27f788c4c: No Jira Issue found in commit message
remote:
remote: refs/heads/dev: 0dba081770e: No Jira Issue found in commit message
remote:
remote: refs/heads/dev: a3d6680c680: No Jira Issue found in commit message
remote:
remote: refs/heads/dev: 76cccb2cc1d: No Jira Issue found in commit message