### Git, Git for Windows, ### Linux Command, Vim Editor presenter: 小P --- ## Git 版本控制系統 Version Control System(VCS) - Local VCS - Centralized VCS - Distributed VCS ---- ## Local VCS ![Local VCS](https://i.imgur.com/cuBmlhG.png) ---- ## Centralized VCS ![Centralized VCS](https://i.imgur.com/xvPgc3T.png) ---- ## Distributed VCS ![Distributed VCS](https://i.imgur.com/7MBCfzT.png) ---- ## Snapshots, Not Differences(1/2) ![Git Snapshots1](https://i.imgur.com/32SaLvm.png) ---- ## Snapshots, Not Differences(2/2) ![Git Snapshots2](https://i.imgur.com/zVSkGlw.png) ---- ## The Three states ![Git Three states](https://i.imgur.com/7fdVR4o.png) ---- ## Files Status ![Files Status](https://i.imgur.com/Sw5Lfq2.png) --- ## Git for Windows https://git-scm.com/download/win ![Git for Windows](https://i.imgur.com/zHv9XsI.jpg) ---- ## Git Bash ![Git Bash](https://i.imgur.com/Z0r9fUb.png) ---- ## Git GUI(1/3) ![Git GUI1](https://i.imgur.com/NFHj0Fx.png) ---- ## Git GUI(2/3) ![Git GUI2](https://i.imgur.com/NsVvSl8.png) ---- ## Git GUI(3/3) ![Git GUI3](https://i.imgur.com/vKYuipG.png) --- ## Linux Command :::info **善用Tab**: 命令補全 & 檔案補齊 ::: ---- ## Linux Command - cd [directory]: **c**hange **d**irectoy ![cd](https://i.imgur.com/keL6K6O.gif) ---- ## Linux Command - ls: list ![ls](https://i.imgur.com/zNd1ssT.gif) ---- ## Linux Command - pwd: **p**rint **w**orking **d**irectory ![pwd](https://i.imgur.com/HxpUUXK.gif) ---- ## Linux Command - mkdir [directory]: **m**a**k**e **dir**ectory ![mkdir](https://i.imgur.com/gnOvtSr.gif) ---- ## Linux Command - rm [file]: **r**e**m**ove ![rm](https://i.imgur.com/Rug9mXy.gif) ---- ## Linux Command - rmdir [empty directory]: **r**e**m**ove **dir**ectory ![rmdir](https://i.imgur.com/uPOQPV1.gif) ---- ## Linux Command - cat [file]: 顯示檔案內容 ![cat](https://i.imgur.com/Eu46QUE.gif) ---- ## Linux Command - cp [file1] [file2]: **c**o**p**y ![cp](https://i.imgur.com/e1cEr3z.gif) ---- ## Linux Command - mv [file1] [file2|directory]: **m**o**v**e ![mv](https://i.imgur.com/EkXHTGK.gif) ---- ## Linux Command - clear: 清除螢幕 ![clear](https://i.imgur.com/5YbUOVO.gif) ---- ## Linux Command - ==info== & ==man== **man**uall ![man](https://i.imgur.com/8VVIJNS.gif) ---- ## Linux Hotkey - **[Ctrl] + [c]**: 中止執行中的命令 ---- ## Linux Hotkey - **[Ctrl] + [d]**: 登出Terminal ---- ## Linux Hotkey - **[Ctrl] + [z]**: 將執行中的命令丟到背景 - **fg**: 將最近一個背景命令變更到前景 ![Ctrl+z & fg](https://i.imgur.com/llPIZj3.gif) ---- ## 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 init](https://i.imgur.com/HaFHE9U.png) ---- ## 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** ![](https://i.imgur.com/1gA5nvc.gif) ---- ## 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 ![](https://i.imgur.com/1If5TVJ.gif) ---- ## 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 screenshot](https://i.imgur.com/Ih0pnur.png) ---- ## Vim Editor Mode ![vim mode](https://i.imgur.com/Kje18lg.png) ---- ## 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":"[]"}
    782 views