### 三個概念
修改狀態
預提交狀態
本地代碼庫(區別與中央代碼庫)
### 命令行基本操作(本地)
>[info] 結合Visual Studio Code,同時進行圖形化界面的操作。
新建README.txt,內容Hello, Git
~~~
git status
git add README.txt
git status
git commit
git log
~~~
添加一行到README.txt,內容Hello, Again
~~~
git status
git add -u
git status
git commit -m "Updated README"
~~~
新建file1.txt和file2.txt
~~~
git status
git add -A
git commit -m "Add cool new feature"
git log
~~~
再添加一行到README.txt,內容Updating README
修改file1.txt,內容Add some code here
~~~
git status
git add file1.txt
git commit -m "add some code to file1"
git add README.txt
git commit -m "update README"
~~~
刪除file2.txt
~~~
git status
git add -u
git status
~~~
新建file3.txt,內容add some code to file3
~~~
git add file3.txt
git status
~~~
重命名file1.txt為file1_new.txt
~~~
git status
git add -A
git status
git commit -m "reorganize the feature"
git log
~~~
### .gitignore
添加logs目錄,在目錄中新建log.txt文件
在根目錄中增加.gitignore文件,內容就是logs,就不會把logs目錄commit到代碼庫中。