Reputation: 773
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
Reputation: 1325107
Once pushed, you cannot easily change the history without affected other users, so it becomes a communication problem.
One approach would be:
branch
to the new origin/branch
Upvotes: 1