While you can try to solve multiple stories in a single ticket you can face the above errors.
Before following the below steps kindly take all the back up first.
To use the Git soft reset command to reset all commits, you first need to find the last commit hash ID. You can obtain this from the git log, GitLab, or any other source where you can view your commit history
https://www.atlassian.com/git/tutorials/undoing-changes/git-reset
Once you have the commit ID, use the following command to reset all commits:
git reset --soft COMMIT_ID
This command will reset your current branch to the specified commit, keeping all your files in their current stashes. After performing the reset, you can commit the changes with the following message format, including the story ID and bug ID if applicable:
[#subtask story ID] [#bug ID] message
If you are working on a story and a bug task simultaneously, you can include both the story ID and bug ID in your commit message. This way, you don’t need to create separate merge requests for each bug.
Still not resolved feel free to ping me.