0%
一些簡單的基本:終端機指令
- 複製檔案
cp
- 重新命名檔案
mv '舊檔名' ‘新檔名‘
- 列出目前位置
pwd
- 移除檔案
rm
- 到根資料夾
cd ~
- 顯示所有包括隱藏的檔案
ls -al
Vim操作

git 基本操作
- 使用者基本資料設定(bt device),設定姓名/電子郵件
1 2
| git config --global user.name "Eddie Kao" git config --global user.email "eddiexxxx@gmail.com"
|
- 這邊拿掉global 的話就會對專案直接做個別設定
- 存取的global使用者資料會在user根資料夾底下的.gitconfig檔案裡
列出當前使用者資料設定
其實可以把git的預設編輯器改成 VSCODE
https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git
git 的操作指令其實也可以寫alias(縮寫)
1 2
| git config --global alias.co checkout //把checkout指令改成co
|
1 2
| git config --global alias.l "log--oneline--graph" //也可以把一些比較複雜的指令改成alias
|
1 2 3
| git config --global alias.ls 'log --graph --pretty=format:"%h <%an> %ar %s"' //or more complicated //把git log的格式簡化用
|
專案git初始化的流程
cd <folder>
git init
git add --all
1 2 3 4 5
| git add -A stages all changes
git add . stages new files and modifications, without deletions
git add -u stages modifications and deletions, without new files
|
git commit -m <commit log>