- Install target mingw-w64:
brew install mingw-w64
- Add target to rustup:
rustup target add x86_64-pc-windows-gnu
- Create
.cargo/config
- Add the instructions below to
.cargo/config
[target.x86_64-pc-windows-gnu]
brew install mingw-w64
rustup target add x86_64-pc-windows-gnu
.cargo/config
.cargo/config
[target.x86_64-pc-windows-gnu]
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!
$ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring