How to undo a whole range of commits ... and then fix that problem

1) Find the last commit that worked

git log --oneline

2) Revert all commits between the one that worked and wherever you've managed to end up now

git revert b32b3fe2e~HEAD --no-commit

The no-commit parameter allows you to fix your stuff before ... 

3) git add your new changes

4) git commit -m "OK, *this* time I'm *pretty* sure it works!"

5) git push

Comments

Popular posts from this blog

Auto Mapper and Record Types - will they blend?

Unit testing your Azure functions - part 2: Queues and Blobs

Testing WCF services with user credentials and binary endpoints