or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
7.2 0424 Git 小劇場
part1: commit前
現有專案如下:
狀況1 : 不小心刪掉檔案
Step1. 先用
git status
查發生什麼事三個檔案被刪掉
Step2. 用
git checkout
把被刪掉的檔案登出staging area如果是
git checkout .
:在staging area把所有變更恢復成最後一次存檔的狀態被刪除的檔案再次出現在該資料夾
狀況2. 看某行程式碼是誰寫的: 使用
git blame
狀況3. 新增目錄: 空目錄無法進版控
如果僅新增目錄後輸入
git status
, 出現nothing to commit因為更新與否,是使用檔案內容做計算。
慣例: 可新增一個
.keep
檔案到資料夾