In order to debug my Heroku app, I kept on making small changes to my local repository and pushing on Heroku as follows:
git commit -m <message>
git push heroku master
Now the problem is my Github's repository is behind by 10 commits from the local and Heroku repositories. I don't want to push all of those 10 commits to Github since they are just small changes. I read about how to reorder commits to push only the latest commit on Github from here. But by reordering, I think I will face problems later when I push future changes to Heroku.
So I'm looking for answers to the following questions:
1. How can I push only the working commit (i.e. latest one) on Github without any conflicts with Heroku in future?
2. What is the correct way to work with Git when working in such environment?