One Commit Per User Check

O

Qubits of DPK

March 24, 2026

Core Open Source

Squashing Commits for Apache Fineract PRs (One Commit Per User Check)

Problem

Apache Fineract CI enforces the rule:
plain text
QUBITS OF DPK
1One Commit Per User Check
If a PR contains multiple commits from the same author, the CI job fails.
Example failing PR commit history:
plain text
QUBITS OF DPK
1FINERACT-2454: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign
2FINERACT-2454: Fix getObligeeData to handle JSON array response
3FINERACT-2549: Fix OpenAPI schema for obligeedetails endpoint to return array response
These must be squashed into a single commit.

Step-by-Step Fix

1. Switch to the PR branch

bash
QUBITS OF DPK
1git checkout feature/FINERACT-2441-feign-migration-clientexternalid

2. Check how many commits are in the PR

shell
QUBITS OF DPK
1git log --oneline upstream/develop..HEAD
Example output:
shell
QUBITS OF DPK
1a1b23c4 FINERACT-2454: Migrate ClientExternalIdTest
2b2c34d5 FINERACT-2454: Fix JSON response handling
3c3d45e6 FINERACT-2549: Fix OpenAPI schema

3. Start interactive rebase

shell
QUBITS OF DPK
1git rebase -i upstream/develop
Git opens the rebase editor.
Example:
plain text
QUBITS OF DPK
1pick a1b23c4 FINERACT-2454: Migrate ClientExternalIdTest
2pick b2c34d5 FINERACT-2454: Fix JSON response handling
3pick c3d45e6 FINERACT-2549: Fix OpenAPI schema

4. Squash commits

Change the last commits from pick to squash.
plain text
QUBITS OF DPK
1pick a1b23c4 FINERACT-2454: Migrate ClientExternalIdTest
2squash b2c34d5 FINERACT-2454: Fix JSON response handling
3squash c3d45e6 FINERACT-2549: Fix OpenAPI schema
Save and exit.

5. Write the final commit message

Git opens another editor to combine messages.
Replace everything with a clean commit message:
plain text
QUBITS OF DPK
1FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign
2
3- Migrates ClientExternalIdTest to use fineract-client-feign
4- Replaces RestAssured API calls with Feign client
5- Fixes obligeedetails endpoint handling for JSON array response
6- Updates OpenAPI schema accordingly
Save and exit.

6. Verify commit count

plain text
QUBITS OF DPK
1git log --oneline upstream/develop..HEAD
Expected output:
plain text
QUBITS OF DPK
1039705437 FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign
Only 1 commit should remain.

7. Push updated history

plain text
QUBITS OF DPK
1git push --force-with-lease origin feature/FINERACT-2441-feign-migration-clientexternalid
This updates the GitHub PR and reruns CI.

Result

Before squash:
plain text
QUBITS OF DPK
13 commits
After squash:
plain text
QUBITS OF DPK
11 clean commit
2FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign
CI check One Commit Per User Check will now pass.

Useful Tip for Future PRs

Instead of creating multiple commits while developing, amend the same commit:
plain text
QUBITS OF DPK
1git add .
2git commit --amend --no-edit
This keeps the PR history clean with one commit from the start.
If you want, I can also give you a second Notion section that shows the exact Vim shortcuts used during rebase (i, ESC, :wq, ggdG). That part is extremely useful when doing interactive rebases.