Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
courses
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TheAlternative
courses
Commits
465d9781
Commit
465d9781
authored
Jan 12, 2020
by
Florian Moser
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.ethz.ch:thealternative/courses
parents
2cae76ba
8db6ed24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
1 deletion
+112
-1
git_gitlab_course/boilerplate-single.html
git_gitlab_course/boilerplate-single.html
+112
-1
git_gitlab_course/images/xkcd_git.png
git_gitlab_course/images/xkcd_git.png
+0
-0
No files found.
git_gitlab_course/boilerplate-single.html
View file @
465d9781
...
...
@@ -21,7 +21,118 @@
class: center, middle
# My Awesome Presentation
# Collaboration with git & Gitlab
---
# Why to use _git_
<img src="images/xkcd_git.png" width="300">
---
# How to use _git_
- installing
- work local
- change & track
---
# Installing _git_
Download *git* for your operating system from [https://git-scm.com/downloads](https://git-scm.com/downloads)
---
# Creating a local repository
open your `Git-Bash`
create a new directory
```bash
mkdir mywebsite
```
change into that directory
```bash
cd mywebsite
```
turn this folder into a git repository
```bash
git init
```
---
# Checking your local repository
you check the status of your repository using
```bash
git status
```
which should give you
```bash
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
```
---
# Change something & commit it
In your folder `mywebsite` create a file `helloworld.html` with the conent
```html
<html>
<body>
<h1>Hello World!</h1>
</body>
</html>
```
check how git sees that file
```bash
git status
```
which tells you that there are
```bash
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
helloworld.html
nothing added to commit but untracked files present (use "git add" to track)
```
---
# Change something & commit it
so let's follow the advice and do
```bash
git add helloworld.html
```
and then **commit** this change
```bash
git commit -m 'add my first file'
```
you can always check everything you did with
```bash
git log
```
```bash
commit 3b5616d1ba962e7a2e4af1f1bdd54f5d65d4e22d (HEAD -> master)
Author: Oscan Openness <dini_mueter@gmx.net>
Date: Sun Jan 12 12:20:28 2020 +0100
add my first file
```
---
git_gitlab_course/images/xkcd_git.png
0 → 100644
View file @
465d9781
47.6 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment