5.1 Working together on Git

Markdown cheat sheet

Creating headers

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5

or you can use:

Header 1
========

Header 2
--------
*This text will be italic*
_This will also be italic_

**This text will be bold**
__This will also be bold__

_You **can** combine them_

Lists

Unordered lists:

* Item 1
* Item 2
  * Item 2a
  * Item 2b

Ordered lists:

1. Item 1
1. Item 2
1. Item 3
   1. Item 3a
   1. Item 3b

Images

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

Code and Syntax Highlighting

```javascript
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```

```python
def foo():
    if not bar:
        return True
```

```bash
#! /usr/bin/env bash
echo "Hello World"
```

```yaml
---
- hosts: all
  tasks:
    - name: Install Apache
      yum:
        name: httpd
        state: latest
```

Tables

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

2. Add your presentation into Skillab - git project

I have added an example, but be creative:

**Claudiu**
*DevOps Engineer*
Likes:

  * [x] coding
  * [x] teaching
  * [x] video games
  * [x] mma

I would like to have in the presentation:

  1. name

  2. profession

  3. hobbies

  4. why are you here?

  5. do you like DevOps?

  6. what would you like more?

  7. what would you like less

How to

vim presentations.md # keep this name so we can have some merge conflicts

git add presentations.md
# or
# pay attention it adds everything

git add --all

# now press the letter "i" to insert
# when you are done writing press the ESCAPE key

# write :wq and press ENTER

git commit -m "Message" # Keep message informative

git push

Solving merge conflicts

To resolve a Git merge conflict, follow these steps:

  1. Identify the conflicting file(s): Git will mark the conflicts in the affected files with conflict markers.

  2. Open the conflicting file(s) and locate the conflict markers.

  3. Choose which version to keep or manually edit the file to include the changes you want.

  4. Remove the conflict markers (e.g. “<<<<<<<”).

  5. Commit the resolved file(s).

  6. Repeat the process for any other conflicting files.

It’s important to carefully review the changes and make sure the resulting file is what you intended before committing. You may also want to consider using a merge tool to assist with resolving conflicts.