### Git, Git for Windows,
### Linux Command, Vim Editor
presenter: 小P
---
## Git
版本控制系統
Version Control System(VCS)
- Local VCS
- Centralized VCS
- Distributed VCS
----
## Local VCS

----
## Centralized VCS

----
## Distributed VCS

----
## Snapshots, Not Differences(1/2)

----
## Snapshots, Not Differences(2/2)

----
## The Three states

----
## Files Status

---
## Git for Windows
https://git-scm.com/download/win

----
## Git Bash

----
## Git GUI(1/3)

----
## Git GUI(2/3)

----
## Git GUI(3/3)

---
## Linux Command
:::info
**善用Tab**: 命令補全 & 檔案補齊
:::
----
## Linux Command
- cd [directory]: **c**hange **d**irectoy

----
## Linux Command
- ls: list

----
## Linux Command
- pwd: **p**rint **w**orking **d**irectory

----
## Linux Command
- mkdir [directory]: **m**a**k**e **dir**ectory

----
## Linux Command
- rm [file]: **r**e**m**ove

----
## Linux Command
- rmdir [empty directory]: **r**e**m**ove **dir**ectory

----
## Linux Command
- cat [file]: 顯示檔案內容

----
## Linux Command
- cp [file1] [file2]: **c**o**p**y

----
## Linux Command
- mv [file1] [file2|directory]: **m**o**v**e

----
## Linux Command
- clear: 清除螢幕

----
## Linux Command
- ==info== & ==man== **man**uall

----
## Linux Hotkey
- **[Ctrl] + [c]**: 中止執行中的命令
----
## Linux Hotkey
- **[Ctrl] + [d]**: 登出Terminal
----
## Linux Hotkey
- **[Ctrl] + [z]**: 將執行中的命令丟到背景
- **fg**: 將最近一個背景命令變更到前景

----
## Linux Hotkey
- **[Ctrl] + [r]**: 搜尋執行過的命令
----
## Linux Hotkey
- **[Ctrl] + [l]**: 清除螢幕
---
## Git Command
Initializing a Repository
1. mkdir [directory name]
2. cd [directory name]
3. git init

----
## Git Command
First-time git setup
- git config [ --global ] user.name [name]
- git config [ --global ] user.email [email]
- git config [ --global ] core.editor [editor]
- git config [ --global ] --edit
- git config --list
----
## Git Command
**Demo** & **Practice**

----
## Git Command
First commit
1. vim README.md
2. git add README.md
3. git status
4. git commit
5. git log
----
## Git Command
First commit

----
## Git Command
Create a New Repository on GitHub NOW!
----
## Git Command
Synchronize Local and Remote
1. git remote add [name] [clone_url]
2. git push [name] [branch_name]
ps. [name] can be named by yourself
----
## Git Command
- git pull [name] [branch_name]: Fetch and integrate from remote repository
- git branch [branch_name]: Create new branch
- git checkout [branch|commit]: Change branch or change status to commit
- git rm [file]
- git mv [file]
- git diff
---
## Vim Editor

----
## Vim Editor
Mode

----
## Vim Editor
Move
- ←: 游標向左移動一個字元
- ↓: 游標向下移動一個字元
- ↑: 游標向上移動一個字元
- →: 游標向右移動一個字元
- [Page Down]
- [Page Up]
- [Home] : 移動到這一列的最前面字元處
- [End] : 移動到這一列的最後面字元處
----
## Vim Editor
Search
- /: 向游標之下尋找
- ?: 向游標之上尋找
- n: 重複前一個搜尋的動作
- N: "反向"重複前一個搜尋的動作
----
## Vim Editor
Copy & Paste
- dd: 刪除一整列
- ndd: 向下刪除 n 列
- yy: 複製一整列
- nyy: 向下複製 n 列
- p, P: 由下一列(上一列)貼上
- ==u==: undo
- ==[Ctrl] + [r]==: redo
----
## Vim Editor
Insert & Replace Mode
- i: 從目前游標所在處插入
- o, O: 在目前游標所在的下一列(上一列)插入新的一列
- r, R: r只會取代游標所在的那一個字元一次, R會一直取代游標所在的文字
- ==ESC==: 回到一般指令模式
----
## Vim Editor
Save & Quit
- :w : Save
- :w! : Force save
- :q : Quit
- :q! : Force quit
- :wq : Save and quit
- :wq!: Force save and quit
---
## Reference
- [Git Book](https://git-scm.com/)
- [鳥哥的 Linux 私房菜](http://linux.vbird.org/linux_basic/)
---
###### tags: `Git` `Git for Windows` `Linux Command` `Vim Editor`
{"metaMigratedAt":"2023-06-14T12:01:10.915Z","metaMigratedFrom":"Content","title":"Untitled","breaks":true,"contributors":"[]"}