To create a new Git repository, follow these steps:
Open your terminal.
Navigate to the directory where you want to create the repository. For example:
cd ~/projectInitialize a new Git repository using the
git initcommand:git init my_projectNavigate into the new repository:
cd my_projectVerify that the
.gitdirectory has been created:ls -aYou should see output similar to:
. .. .git
Now you have successfully created a new Git repository named my_project. You can start adding files and making commits.
