Skip to content
Snippets Groups Projects
Unverified Commit a2b5e6e6 authored by Lukas Kluft's avatar Lukas Kluft
Browse files

Make git init example more clear (make directory first)

parent f4b42a82
No related branches found
No related tags found
1 merge request!48Improve git lecture
...@@ -28,7 +28,9 @@ There are many version control systems out there (e.g. Subversion, CVS, Mercuria ...@@ -28,7 +28,9 @@ There are many version control systems out there (e.g. Subversion, CVS, Mercuria
![](https://git-scm.com/images/logos/downloads/Git-Logo-2Color.svg "Git logo"){height=10%} ![](https://git-scm.com/images/logos/downloads/Git-Logo-2Color.svg "Git logo"){height=10%}
## As easy as **1, 2, 3** ## As easy as **1, 2, 3**
```bash ```{.bash code-line-numbers="3-5"}
mkdir my_repo
cd my_repo
git init . # Initialize a repository git init . # Initialize a repository
git add . # Add the whole directory content (don't do that) git add . # Add the whole directory content (don't do that)
git commit -m "Initial commit" # Commit your changes git commit -m "Initial commit" # Commit your changes
...@@ -82,7 +84,7 @@ git config --global user.email "youremail@yourdomain.com" ...@@ -82,7 +84,7 @@ git config --global user.email "youremail@yourdomain.com"
## Hands-on Session {background-color=var(--dark-bg-color)} ## Hands-on Session {background-color=var(--dark-bg-color)}
1. Configure the username and email adress in your local git client 1. Configure the username and email adress in your local git client
2. Initialize an empty Git repository 2. Create a directory and initialize a Git repository
3. Create a file and add it to the repo 3. Create a file and add it to the repo
3. Change the file, inspect the differences, and commit the changes 3. Change the file, inspect the differences, and commit the changes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment