GIT – Basic installation

Published on Author gryzli

This is a simple resume on bringing online git server repository + client accessing it.

Make sure you have git installed – the easiest way is by using your distribution’s package manager.

Example Server Setup

We assume that we have the following basic straight-forward sever setup :

– Git Server –>

– Git Client –>

Server-Side project creation

Login to (Your future git server) and execute the following commands

# Create system user for the repo
adduser git
# Give some good password
passwd git 

# Login with the newly created user
su - git

# Initialize bare git repo
cd /home/git
git clone --bare my_new_repo my_new_repo.git

Now we have our empty bare project repository.

At this moment, the 2 basic methods we could use to work with this repo are as follows:

– By using the newly created user git and it’s password

– By creating public/private key pairs for user git and give them to the users which will work with this repo

Currently we will use the simplest method of using plain old user/pass authentication through SSH.


Client-Side project creation

Login to the client server ( and execute the following:

# Create some example project directory
mkdir new_project
cd new_project

# Add some dummy files 
touch 1 2 3 4 5 6 

# Now clone here our newly created repo
git clone

# Make initial commit and add all of the newly created files (1..6) 
git add .

# Commit them
git commit -m "Sample commit comment"

# Now add our remote repo
git remote add origin

# Finally push all of the changes to the remote repo
git push origin master


Optional Client-Side configurations

Here are some basic configs you may want to do after newly installed git.

# Configure your name and email
git config --global "Gryzli Bugbear" 
git config --global ""

# Configure global editor
git config --global core.editor vim

# Configure diff tool
git config --global merge.tool vimdiff

# List current configuration settings
git config --list



Detailed documentation concerning all aspects of GIT.