Skip to content

Commit 647a229

Browse files
committed
config editor && -C param
1 parent fcb2715 commit 647a229

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,29 @@ git pull
616616

617617
如果有衝突,要先解衝突。
618618

619+
這邊補充一下 `-C` 這個參數的意思, 它的意思代表指定 folder 路徑,
620+
621+
有時候我們可能不想先 `cd` 進去資料夾, 再進行 pull, 這時候,
622+
623+
就很適合使用它:smile:
624+
625+
```cmd
626+
git [-C <path>] pull
627+
```
628+
629+
舉例,
630+
631+
```cmd
632+
cd git_folder
633+
git pull
634+
```
635+
636+
可以直接簡化為
637+
638+
```cmd
639+
git -C git_folder pull
640+
```
641+
619642
## git fetch
620643

621644
可以先簡單想成 **git pull = git fetch + git merge**
@@ -1804,6 +1827,12 @@ git config --global core.autocrlf input
18041827

18051828
如果你想更深入的了解, 可參考 [格式化-core.autocrlf](https://git-scm.com/book/zh-tw/v1/Git-客製化-Git-設定#格式化與空格).
18061829

1830+
### 修改 editor
1831+
1832+
```cmd
1833+
git config --global core.editor "vim"
1834+
```
1835+
18071836
## Reference
18081837

18091838
* [13 Git tips for Git's 13th birthday](https://opensource.com/article/18/4/git-tips)

0 commit comments

Comments
 (0)