Reputation: 86197
Am I right in thinking it's not a good idea to squash initial commits in most repos?
I've seen lots of answers telling you how to squash the last commits but I assume, on a shared repo, it's not wise to squash initial commits as you're basically rewriting history.
Upvotes: 2
Views: 232
Reputation: 25349
If you haven't published these commits feel free to squash them.
Otherwise people will hate you, because when you squash commits you are removing old commits and making new ones. Other developers will have to deal with these new commits and probably merge them, but after that it will become a real mess, because they will try to push their works back into a shared repo.
If you really need to squash public commits you can do it and publish your changes, but you will have to ask your teammates to re-clone repos and apply their works as patches from their individual repos.
Upvotes: 1