I’m still figuring GitHub and Heroku out, so please bear with me. 🙂
I’ve a web app on, say, xyz.com. What I am doing now is to make some code/UI changes on some files, commit those files, push them to the master branch, and then refreshing the url to see these changes.
I think this is obviously the wrong approach, but I don’t know of how else to test changes done to my code without having to push them on to the master branch. How could I do so?
I don’t quite understand the situation in the full version of your question (see my comment and, as icc asks, why can’t you test locally?), but to answer the question in the title, you can see the differences between your master and the version on GitHub by running:
(That’s assuming that the remote that refers to your GitHub repository is called
github– it might well beoriginin your case. You can see all your remotes withgit remote -v.)To explain that a little further, when you run
git fetch github, git will update all your so-called “remote-tracking branches” – in most cases those are the ones that look likeorigin/whatever,github/experiment, etc. Those are like a cache of the state of those branches, and they’re only updated when you rungit fetchor successfullygit pushto that branch on the remote repository. So, once you’ve done this to make sure thatgithub/masteris a recent snapshot of that branch on GitHub, you can happily compare it with your localmasterbranch usinggit diff.