Here's an answer from James Moger to the same question asked in the GitBlit forum:
HI Manisha,
In the 1.3.x code GitBlit is the context for the webapp. It is a singleton but it must be properly initialized by the container through web.xml or by using the embedded Jetty. In the 1.3.x code you can't just instantiate a GitBlit instance and have it be ready for use.
In the current master branch (1.4.x) things have been massively refactored and modularized. GitBlit is no longer a webapp context but is the aggregation of several smaller classes. It still relies on proper initialization/configuration but this requirement is now more obvious.
Depending on your needs, you may do better with just harvesting code from the JGitUtils class.
-J