Skip to content

Commit

Permalink
update readme file with Squashing your Commits
Browse files Browse the repository at this point in the history
  • Loading branch information
kapmaurya committed Nov 1, 2024
1 parent eb5d02e commit dd46ba7
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,8 @@ Mifos boasts an active and vibrant contributor community, Please join us on [sla
### [**Making a Pull Request**](https://github.com/openMF/mobile-wallet/wiki/Making-a-Pull-Request)


### **Squashing Your Commits**
### [**Squashing Your Commits**](https://github.com/openMF/mobile-wallet/wiki/Squashing-Your-Commits)

It is common for pull requests to undergo multiple rounds of review before being merged. To keep the Git history clean and organized, you should always squash your commits before finalizing the merge. Here's how you can do it:

1. Squash your commits:

```bash
git rebase -i HEAD~x
```

Replace **`x`** with the number of commits you want to squash. An interactive rebase will open, allowing you to choose how to combine the commits. Change **`pick`** to **`squash`** (or simply **`s`**) for all but the topmost commit. Save and exit the editor.

2. Amend the commit message if needed.

```bash
git commit --amend
```

3. Force push the changes to your forked repository:

```bash
git push --force origin your-branch-name
```

Please note that force pushing rewrites the Git history, so use it with caution.


### **Solving Merge Conflicts**

Expand Down

0 comments on commit dd46ba7

Please sign in to comment.