Create new git repo command
To create a new Git repository, you can use the following command:
git init
This command will create a new Git repository in the current directory. If you want to create a new Git repository in a specific directory, you can navigate to that directory and then run the command.
For example, if you want to create a new Git repository in a directory called "myproject", you would navigate to that directory and then run the command:
cd myproject
git init
This will create a new Git repository in the "myproject" directory.
If you want to create a new Git repository with a specific name, you can use the following command:
git init mynewrepo
This will create a new Git repository called "mynewrepo" in the current directory.
Note: The git init
command only creates the basic structure of a Git repository, it doesn't add any files or commit them. You will need to add files to the repository and commit them using the git add
and git commit
commands.