stephnangue / openlab

0 stars 0 forks source link

8. Create a repository #15

Open stephnangue opened 1 year ago

stephnangue commented 1 year ago

Show a figure to resume the chapter

Create a directory named 'bootstrap' and add two files into it

mkdir bootstrap cd bootstrap echo '#!/bin/bash' >> install-runtimes.sh echo 'This repository host source code use to install the following runtimes on a Linux RPM-based host : ' >> README.md

Go in the directory 'bootstrap' and turn it into the a Git repository

cd bootstrap git init

Notice that there are no commits yet in the repository

git log

Notice that there are non remote references configured yet

git remote -v

Notice that Git does not show any branches yet

git branch -a

Display the content of the working directory

git status

Move those files to the staging area

git add .

Display the content of the staging area

git status

Create a commit with those files and tag it

git commit -m "first commit" git tag -a v0.0.1 -m "the version 0.0.1 of my product"

Notice that Git now shows you the main branch

git branch -a

Notice that Git now shows you the commit tree, with the tag included

git log --graph

Finally, inspect the newly created tag

git show v0.0.1