Hacker News new | ask | show | jobs
by OkayPhysicist 1316 days ago
The closest thing is to

git branch <temporarybranchname>

git checkout <originalbranchname>

git whatevertomfooleryyouwant

And if everything is foobar

git checkout <temporarybranchname>

Or, if you think the liklihood of messing stuff up is higher than the likelihood of success, make your changes to the temporary branch.