You could use branches to fix your bugs and then merge to the master branch and push to the live website whenever you need.
To create a new branch and immediately switch on it: git checkout -b branchname
(of course you can type any name instead of "branchname").
If you want to change branch just type git checkout
followed by the name of the branch you want to work on (the main branch is called "master").
To merge the new branch into the main one, first switch to the master branch, as explained above (git checkout master
) and then type git merge branchname
. Of course "branchname" will be replaced by the actual name of the branch you want to merge.
For more information you can refer to this article: http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging