how git squash works if i already pushed
- User
how git squash works if i already pushed
- Assistant
If you've already pushed commits to a remote branch and want to squash those commits, you can still do so, but you need to be cautious because it involves rewriting the commit history and can affect others who might be working on the same branch. Here’s how you can squash commits that have already been pushed: