Experiment in a Git branch

When programming you often come across code you'll want to change or refactor. After some tinkering the improvement turns out to not be such a great improvement after all. Your first instinct might be to Ctrl+Z all the way back to safety. If you've been committing the changes to…