# Using ts-node
npx ts-node <path/to/git.ts> init [directory]
# Using node
node <path/to/git.js> init [directory]
-
directory
The directory where the init command will be executed. If this directory does not exist, it will be created.
This command created an empty Git repository or reinitialize an existing one.
Refer to this official doc for more information about the .git
directory.
-
Added support for the command through git.ts. The code for init command is present in init.ts.
-
Created a separate folder default-file that contains some of the files required as per the Git protocol. The contents of these files are copied to the
.git
directory. To ensure that these folder is also copied to the build dir, I updated the build script present in package.json