Skip to content

Commit

Permalink
Add squashing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lindenmckenzie committed Feb 6, 2025
1 parent 9dee812 commit 8362ffa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions COMMIT_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,20 @@ When working on a feature branch, it's common for your branch to become outdated

- Coordinate with Reviewers/Team: Rebasing during an active code review can complicate the review process. Always check with your reviewer/team style guide before rebasing or tidying up commit histories.
- Use Squashing Judiciously: Squash commits when it makes sense to consolidate minor, related changes into one atomic commit. Just ensure that you retain enough detail in the commit message to explain the consolidated changes.

An example rebasing flow might look like this:

```sh
git switch feature/my-feature
git fetch
git rebase origin/develop
# resolve possible conflicts here
git push origin --force-with-lease # force with lease is preferred for safety
```

An example squash merge flow might look like this:

```sh
git switch develop
git merge --squash feature/my-feature
```

0 comments on commit 8362ffa

Please sign in to comment.