Skip to content

Commit 78e62f0

Browse files
committed
Update Slide
1 parent 66040e8 commit 78e62f0

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

merge-conflict.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
# This file is best viewed in vscode using vscode-reveal
3+
# https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal
4+
title: "JavaScript"
5+
logoImg: "https://raw.githubusercontent.com/HansUXdev/JavaScript-First/2acf5840c15af96602aceb66303ea69c5b75e344/logo.svg"
6+
theme: "night"
7+
highlightTheme: "Monokai "
8+
#transition: " slide "
9+
#transitionSpeed: " default "
10+
#slideNumber: true
11+
#loop: true
12+
#autoSlide: 5000
13+
# openButton: false
14+
#enableMenu: false
15+
# controlsLayout: 'edges'
16+
# controls: true
17+
#enableChalkboard: false
18+
# enableTitleFooter: false
19+
#autoSlideStoppable: true
20+
---
21+
22+
<style>
23+
</style>
24+
25+
26+
### Creating Merge Conflicts
27+
28+
29+
```bash
30+
mkdir git-repo
31+
cd git-repo
32+
git init
33+
touch my_code.sh
34+
echo "echo Hello" > my_code.sh
35+
git add my_code.sh
36+
git commit -am 'initial'
37+
git checkout -b new_branch
38+
echo "echo \"Hello World\"" > my_code.sh
39+
git commit -am 'first commit on new_branch'
40+
git checkout master
41+
echo "echo \"Hello World!\"" > my_code.sh
42+
git commit -am 'second commit on master'
43+
git merge new_branch
44+
```
45+
1. Create a new directory called "git-repo" {.fragment .current-only data-code-focus=1-1 }
46+
2. Change the directory {.fragment .current-only data-code-focus=2-2 }
47+
3. creates an empty Git repository{.fragment .current-only data-code-focus=3-3 }
48+
4. create a file called my_code.sh {.fragment .current-only data-code-focus=4-4 }
49+
5. add some commands to the file, should now read `echo hello` {.fragment .current-only data-code-focus=5-5 }
50+
6. add the file to the git repository {.fragment .current-only data-code-focus=6-6 }
51+
7. Make your first commit {.fragment .current-only data-code-focus=7-7 }
52+
8. Switch to a new branch called "new_branch" {.fragment .current-only data-code-focus=8-8 }
53+
9. Change the file {.fragment .current-only data-code-focus=9-9 }
54+
10. Commit {.fragment .current-only data-code-focus=10-10 }
55+
11. Go to the main branch {.fragment .current-only data-code-focus=11-11 }
56+
12. Change the text again {.fragment .current-only data-code-focus=12-12 }
57+
13. Commit changes {.fragment .current-only data-code-focus=13-13 }
58+
14. merge the branches {.fragment .current-only data-code-focus=14-14 }
59+
60+
61+
---
62+

0 commit comments

Comments
 (0)