user964287
user964287

Reputation: 773

How to squash specific commits that have been pushed to remote?

I have made the following commits in my branch and pushed them to remote

commit 5
commit 4
commit 3
commit 2
commit 1

I now want to squash commits 1, 2 & 3 and remove commits 4 & 5 (dont need the changes anymore) How can i do this?

Upvotes: 1

Views: 275

Answers (1)

VonC
VonC

Reputation: 1325107

Once pushed, you cannot easily change the history without affected other users, so it becomes a communication problem.

One approach would be:

Upvotes: 1

Related Questions