A repository is a project folder that Git watches, combining working files with version-control history. Run Git commands from the repository’s root directory. section 19.3
A local repository provides:
- A hidden .git directory that stores Git’s management data; do not modify it directly. section 19.3.1
- A main branch created during initialization, with additional branches available later. section 19.3.1
- Status tracking that distinguishes tracked files from untracked project files. section 19.3.1
Initialize a PowerShell project
Create and enter a project folder, then run git init. Git reports an empty repository on the main branch. After adding file1.ps1 and file2.ps1, git status identifies them as untracked until they are added to source control. section 19.3 section 19.3.1
PS C:\MyPSTool> git init
Initialized empty Git repository in C:/MyPSTool/.git/
PS C:\MyPSTool> Get-ChildItem -Hidden
Directory: C:\MyPSTool
Mode LastWriteTime Length Name
---- ------------- ------ ----
d--h-- 6/14/2023 3:26 PM .git
Inspect the folder after initialization to see the hidden .git directory that marks it as a repository. section 19.3.1









