Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
a2b5e6e6
Unverified
Commit
a2b5e6e6
authored
1 year ago
by
Lukas Kluft
Browse files
Options
Downloads
Patches
Plain Diff
Make git init example more clear (make directory first)
parent
f4b42a82
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!48
Improve git lecture
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/git/slides.qmd
+4
-2
4 additions, 2 deletions
lectures/git/slides.qmd
with
4 additions
and
2 deletions
lectures/git/slides.qmd
+
4
−
2
View file @
a2b5e6e6
...
@@ -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
{height=10%}
{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.
I
nitialize a
n empty
Git repository
2.
Create a directory and i
nitialize 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment