What is the folder called .git
?
It\'s created in a repository. What is contained within it and why is created?
Basiclly, it means your dir is handled by Git (Git repository). If you move it somewhere else (or delete it), you'll face something like:
fatal: Not a git repository (or any of the parent directories): .git
every time you use 'git *' command there.
You can move the .git directory somewhere else using:
git --git-dir=/myproject_path/myproject.git log --oneline
Or:
export GIT_DIR=/myproject_path/myproject.git
But i don't recommend doing it. Pay attention that it is only 1 folder, unlike SVN.
It holds all relevant info for GIT to handle your code, like the position of the HEAD, hooks to apply before/after commit/push and some other files.
Maybe most "famous" file inside is the config file which holds all your branches info.
Recommend to read here more info.