Git vs Working Directory – Learn the difference
Working Directory and Git Directory are repositories (folders) for storing files. But they work in different ways. Here are the main distinctions between them.
Creator of a Git vs. Working Directory
- A working directory is a folder you create to store all your project’s files.
- A Git directory is a folder Git creates in the working directory you instructed it to monitor.
Visibility
- A Git directory is a hidden folder.
- A working directory is a regular folder.
Usage of a Git vs. Working Directory
- A Git directory records the file versions you authorized Git to track.
- A working repository can store any file type. It can store files (or folders) that are under version control and those that are not.
Location
- You can create a working directory anywhere in your system.
- Git creates the Git directory inside a working repository.
Content of a Git vs. Working Directory
- A working directory contains both tracked and untracked files.
- A Git directory contains only tracked files.