Git install and create bare repo

@Inderpreet
Here is another issue i have solved this task before. It failed this time not sure whats wrong?

@nashwan In your original answer I can’t see you created the repository. Did you accidentally click on finish button before performing the task at all ?

@Inderpreet I have created it you can see I already changed directory to that ecommerce.git and from there I have run ls la

@nashwan its pending for you now, please try again.

@Inderpreet @Ayman A small clarification.

In task, it is asked to create git in the format eg: /opt/beta.git What is the expectation here? Is it expected to create the folder name as beta.git and CD into this folder and initialise the git OR create the folder and initiate the git so that .git subfolder is created.

As for my search .git is an extension and used in cloning.

I’m confused about how the validation takes this. Please help me to understand.

yes, that is correct. Make sure you don’t create bare repository

yum install git
ls -la
mkdir -p /opt/beta.git
ls -l /opt/
cd /opt/beta.git/
ls -l
git init
ls -la

Could someone help me to understand why we need to create the NAME.git directory? It’s not clear/apparent to me (from the instructions in the lab) that NAME.git is a directory versus the resulting name of the .git file after being initialized.


The lab shows the git package itself is not installed. Where I can see the git --version resolving the installed version. Any suggestions please??


Another example

cd /opt/
sudo git init --bare blog.git

1 Like

What is the purpose of creating a bare repository over initialing an empty directory?

Hi @sathishphcl,
Please install the git on the correct server. In the question, it asked to install it on the storage server, but you installed it on the jump host server, which is completely wrong.
Please give it another try.

Regards,