When initialize a new git repository (on Linux/Ubuntu), we use:

```
# What this doing:
GIT_DIR=myproject.git git init  
#The above line will output: Initialized empty Git Repo...

cd myproject.git  
git --bare update-server-info  
cp hooks/post-update.sample hooks/post-update

```

The first line "**GIT\_DIR=...**" confuses me, it seems bash will get a env variable and git use the first to init the new project, BUT how? Who can explain this little magic?