diff --git a/git_gitlab_course/boilerplate-single.html b/git_gitlab_course/boilerplate-single.html index 811082f3d09ee0cb389144fe6608ad9f1f5aee10..4617d0aeb078ecc7221b3aa6779d680bd4177a92 100644 --- a/git_gitlab_course/boilerplate-single.html +++ b/git_gitlab_course/boilerplate-single.html @@ -21,7 +21,118 @@ class: center, middle -# My Awesome Presentation +# Collaboration with git & Gitlab + +--- + +# Why to use _git_ + + +--- + +# 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 + + +

Hello World!

+ + +``` + +check how git sees that file +```bash +git status +``` + +which tells you that there are +```bash +No commits yet + +Untracked files: + (use "git add ..." 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 +Date: Sun Jan 12 12:20:28 2020 +0100 + + add my first file +``` + --- diff --git a/git_gitlab_course/images/xkcd_git.png b/git_gitlab_course/images/xkcd_git.png new file mode 100644 index 0000000000000000000000000000000000000000..3f35d2d7abeed15e161dcc2b92d4851533c53aac Binary files /dev/null and b/git_gitlab_course/images/xkcd_git.png differ