|
@ -2,7 +2,7 @@ |
|
|
This a repository example to practice the Git basic commands. |
|
|
This a repository example to practice the Git basic commands. |
|
|
|
|
|
|
|
|
# First commit # |
|
|
# First commit # |
|
|
The first commit is the creation of the =file-a.md= file and some lines of code. |
|
|
|
|
|
|
|
|
The first commit is the creation of the `file-a.md` file and some lines of code. |
|
|
|
|
|
|
|
|
Then the repository will be enable by |
|
|
Then the repository will be enable by |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ Then the repository will be enable by |
|
|
$ git init |
|
|
$ git init |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
after that our first file has been created and will be filled with the next lines of code using the =echo= command or =Vim= editor: |
|
|
|
|
|
|
|
|
after that our first file has been created and will be filled with the next lines of code using the `echo` command or `Vim` editor: |
|
|
|
|
|
|
|
|
``` shell |
|
|
``` shell |
|
|
vi file-a.md |
|
|
vi file-a.md |
|
@ -24,15 +24,15 @@ Line 2 |
|
|
Line 3 |
|
|
Line 3 |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
to quit =Vim= editor use =:wq!= in command mode (pressing first the ESC key) |
|
|
|
|
|
|
|
|
to quit `Vim` editor use `:wq!` in command mode (pressing first the ESC key) |
|
|
|
|
|
|
|
|
Then, we have to add the file we want to track by =git add <file(s)>= command: |
|
|
|
|
|
|
|
|
Then, we have to add the file we want to track by `git add <file(s)>` command: |
|
|
|
|
|
|
|
|
``` shell |
|
|
``` shell |
|
|
$ git add file-a.md |
|
|
$ git add file-a.md |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
To finalize the process, we have to use the =git commit= command: |
|
|
|
|
|
|
|
|
To finalize the process, we have to use the `git commit` command: |
|
|
|
|
|
|
|
|
``` shell |
|
|
``` shell |
|
|
$ git commit -m "first commit" |
|
|
$ git commit -m "first commit" |
|
|