What is the difference if i download code from magento.com site or https://github.com/magento/magento2 .
Because they have different file structure. In guides on magento site: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-structure.html is defined structure which is on github, The same is for backend.
In magento.com we have structure under vendor, but in github version we have structure within app directory.
The github structure is meant for those devs who would like to be contributors and make changes to magento's core. The file structure shown in the link is meant for those instances deployed via composer. These are for SIs and merchants. http://devdocs.magento.com/guides/v2.0/install-gde/continue.html