To build a Git repository, simply log in to your Hostginger hosting account through SSH and enter the following command:

git init repository

Replace repository with the name of the directory where you wish to create the repository (the git init command creates the directory if it does not already exist).
Change the current working directory to the new repository:

cd repository

Type the following command to take a snapshot of all the files presently in the repository directory:

git add .

The git add command places the files in a temporary staging region known as the "index" in Git.
Type the following command to permanently commit the files to the repository:

git commit

A text editor opens, and you can type a commit message that describes the changes. Save the message, and then Git adds the changes to the repository.
 
 
 
Was this answer helpful? 0 Users Found This Useful (0 Votes) GIT, Versioning Control