ERROR: Some commits do not follow the required format. The following commits need to be fixed:
- Commit c507bffd8b19a9c1251ae5af46c17ef71efd6507 does not follow the required format. Message: "Update submodules for matching repositories"
Please squash the last 2 commits into a single commit with a proper commit message.
Method 1 (in case during rebase you encounter difficulty please abort and follow method 2):
1. git rebase -i HEAD~2
2. Your default text editor will open with a list of the last 2 commits, each starting with the word "pick".
Leave the first commit as "pick" (this is the one you're squashing into).
Change the word "pick" to "squash" for the next commits.
3. Save and close the editor.
4. After closing the editor, another editor window will open for you to combine the commit messages or write a new one.
Write your new commit message according to the desired format. For example:
"feat/test: Combined commit message for feature progress"
5. Save and close the editor. Git will now squash the commits into a single commit with your new message.
6. git push --force
Please ensure your commit messages follow the required pattern.
Method 2 (if you don't want to squash commits):
1. git reset --soft HEAD~2
2. commit with proper format such as git commit -m "feat/YOUR_JIRA_TICKET: Combined commit message for feature progress"
3. git push --force