I use Visual Studio as my development environment, and tab indentation is 4, but after I commit to Google Code, the indentation is 8 in the browser, which makes my code look ugly.
Does anyone know how to reset the tab indentation to 4 when looking at it in web browser?
Apparently this is not supported. This enhancement request was filed nearly 5 years ago, and is still marked as "won't fix":
So it looks like you are out of luck. I guess that's what you get for using tabs instead of spaces. Tabs require far too much support from the editor, and high quality editors are sadly still not ubiquitous.
It is trivial to configure Visual Studio to use spaces everywhere instead of tabs, including when you press the Tab key: Tools → Options → Text Editor → <language> → Tabs → Insert Spaces
If you don't want to use spaces everywhere, you could set up your source control system to convert tabs to spaces when you commit code, and convert the spaces back to tabs when you check out. Sounds like a lot of effort just to work around the limitations of one of your tools, but it wouldn't be that hard in practice once you got it set up.