Day 21 of 100 Days of Devops
Set Up Git Repository on Storage Server
Day 21 of 100 Days of Devops
The Nautilus development team has provided requirements to the DevOps team for a new application development project, specifically requesting the establishment of a Git repository. Follow the instructions below to create the Git repository on the Storage server in the Stratos DC:
Utilize yum to install the git package on the Storage Server.
Create a bare repository named /opt/apps.git (ensure exact name usage).
Setting up Empty Git repo
This is quite interesting because I’ve never setup local git repository on my own as an engineer.
So first I tried to check the git init help and it is saying that we can create a bare repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>]
[--separate-git-dir <git-dir>] [--object-format=<format>]
[--ref-format=<format>]
[-b <branch-name> | --initial-branch=<branch-name>]
[--shared[=<permissions>]] [<directory>]
--[no-]template <template-directory>
directory from which templates will be used
--[no-]bare create a bare repository
--shared[=<permissions>]
specify that the git repository is to be shared amongst several users
-q, --[no-]quiet be quiet
--[no-]separate-git-dir <gitdir>
separate git dir from working tree
-b, --[no-]initial-branch <name>
override the name of the initial branch
--[no-]object-format <hash>
specify the hash algorithm to use
--[no-]ref-format <format>
specify the reference format to use
Creating the repository
1
2
3
git init --bare /opt/apps.git
Thata’s all for today , Thx Bye.
This post is licensed under CC BY 4.0 by the author.