look like fabric runs each command in a separate shell (though i am not sure), I have temporarily solved this by rewriting commands that changes file-system in following format. If anyone has a better explanation on how fabric does this, it will be very helpful.
Instead of using
run("umask 002")
run("git pull")
i have changed that to
run("umask 002 && git pull")
And everything works as expected
[Edit]
Fabric has a clear documentation on this http://www.fabfile.org/faq.html#my-cd-workon-export-etc-calls-don-t-seem-to-work
So each call has its own distinct shell session. That is why umask set on a call has no effect on other subsequent calls