Skip to content

Commit f82ea00

Browse files
committed
change '_' to '-'
1 parent 9c1177f commit f82ea00

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,17 @@ git push origin/mybranch -u
151151

152152
## 删除本地分支
153153
```sh
154-
git branch -d <local_branchname>
154+
git branch -d <local-branchname>
155155
```
156156

157157
## 删除远程分支
158158
```sh
159-
git push origin --delete <remote_branchname>
159+
git push origin --delete <remote-branchname>
160160
```
161161

162162
或者
163163
```sh
164-
git push origin :<remote_branchname>
164+
git push origin :<remote-branchname>
165165
```
166166

167167
## 查看标签(tag)
@@ -208,7 +208,7 @@ git push origin :refs/tags/<tag-name>
208208

209209
## 放弃工作区的修改
210210
```sh
211-
git checkout <file_name>
211+
git checkout <file-name>
212212
```
213213

214214
放弃所有修改:
@@ -240,12 +240,11 @@ git log
240240
## 查看某段代码是谁写的
241241
blame的意思为‘责怪’,你懂的。
242242
```sh
243-
git blame <file_name>
243+
git blame <file-name>
244244
```
245245

246246
## 显示本地执行过git命令
247247
就像shell的history一样
248-
249248
```
250249
git reflog
251250
```
@@ -333,7 +332,7 @@ git stash clear
333332

334333
## 从stash中拿出某个文件的修改
335334
```sh
336-
git checkout <stash@{n}> -- <file_path>
335+
git checkout <stash@{n}> -- <file-path>
337336
```
338337

339338
## 展示所有tracked的文件
@@ -357,14 +356,14 @@ git ls-files --others -i --exclude-standard
357356
2. 不会影响tracked的文件的改动,只会删除untracked的文件
358357

359358
```sh
360-
git clean <file_name> -f
359+
git clean <file-name> -f
361360
```
362361

363362
## 强制删除untracked的目录
364363
可以用来删除新建的目录,**注意**:这个命令也可以用来删除untracked的文件。详情见上一条
365364

366365
```sh
367-
git clean <directory_name> -df
366+
git clean <directory-name> -df
368367
```
369368

370369
## 重命名分支
@@ -436,12 +435,12 @@ git config --global --unset <entry-name>
436435
## 新建并切换到新分支上,同时这个分支没有任何commit
437436
相当于保存修改,但是重写commit历史
438437
```sh
439-
git checkout --orphan <branch_name>
438+
git checkout --orphan <branch-name>
440439
```
441440

442441
## 展示任意分支某一文件的内容
443442
```sh
444-
git show <branch_name>:<file_name>
443+
git show <branch-name>:<file-name>
445444
```
446445

447446
## clone下来指定的单一分支

0 commit comments

Comments
 (0)