Create a new branch when you start debugging (git checkout -b debugging
or similar), and then make all your commits on there, pushing them to Heroku instead of your master via git push heroku debugging:master
.
Then when you've fixed the problem, you can squash your debugging changes into a single commit and merge them back into master:
git checkout master
git merge debugging --squash
git branch -D debugging
There are lots of other ways to go about doing this, it all comes down to which you find the most logical.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…