Git init
The git init is a command which is used to create a new blank repository. Git Init command is used to initialize any directory as Git project.
Create a blank repository
To create a blank repository we will use git init
git init
Now we will add some files in our repo, so in this demo case we will create a simple hello world java program in our repo.
In the above example we have created a file named hello-world.java using vim editor
To create it using vim, execute
vim hello-world.java
Press i for inserting data and paste below code.
Class salesforcedrillers { public static void main(String args[]) { System.out.println("HELLO WORLD"): } }
For exiting from vim press : and then press wq which means write quit