Intern
How to create a local Git repository?
sobes.tech AI
Answer from AI
- Open the terminal or command prompt.
- Navigate to the directory you want to make a repository, or create a new one.
# Navigate to an existing directory cd /path/to/folder # Or create a new directory and navigate into it mkdir new_repository cd new_repository - Initialize a Git repository in the current directory.
# Initialize an empty Git repository git init
A hidden folder .git will appear in the directory, containing the necessary files for Git operation.