Create a new Git Repository [ 2024 ]
Create a New Git Repository
Repositories are like directories that hold the project files. We can create a new repository on both the GitHub website and on local machine using the Git command-line client. Let’s create a new repository using the git command line.
GitHub Repository
https://www.testingdocs.com/questions/how-to-create-a-repository-on-github/
New Git Repository
Steps to create a new repository are as follows
- Launch the Git command-line tool
- ( https://www.testingdocs.com/installing-git-on-windows-10/)
- Create a new project directory.
- Issue git init command to initialize the repository.
git init
git init command creates a .git folder within the project directory. For example, in the above case:
~\testingdocs\SampleProject\.git
This directory has the information to track the changes to the project. Sample .git folder on Windows machine would like as shown:
Common error
https://www.testingdocs.com/questions/how-to-fix-fatal-not-a-git-repository-error/
Git Tutorials on this website:
https://www.testingdocs.com/git-tutorials/
More information on Git, official website: