Skip to content

Commit d6318ca

Browse files
committed
更新
1 parent f9f9eab commit d6318ca

File tree

1 file changed

+4
-40
lines changed

1 file changed

+4
-40
lines changed

README.md

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -217,47 +217,26 @@ git stash clear
217217
git checkout <stash@{n}> -- <file_path>
218218
```
219219

220-
## Show all tracked files
220+
## 展示所有tracked的文件
221221
```sh
222222
git ls-files -t
223223
```
224224

225-
## Show all untracked files
225+
## 展示所有untracked的文件
226226
```sh
227227
git ls-files --others
228228
```
229229

230-
## Show all ignored files
230+
## 展示所有忽略的文件
231231
```sh
232232
git ls-files --others -i --exclude-standard
233233
```
234234

235-
## Create new working tree from a repository (git 2.5)
236-
```sh
237-
git worktree add -b <branch-name> <path> <start-point>
238-
```
239-
240235
## Create new working tree from HEAD state
241236
```sh
242237
git worktree add --detach <path> HEAD
243238
```
244239

245-
## Untrack files without deleting
246-
```sh
247-
git rm --cached <file_path>
248-
```
249-
250-
251-
__Alternatives:__
252-
```sh
253-
git rm --cached -r <directory_path>
254-
```
255-
256-
## Before deleting untracked files/directory, do a dry run to get the list of these files/directories
257-
```sh
258-
git clean -n
259-
```
260-
261240
## 强制删除untracked的文件
262241
清空工作区untracked的文件
263242
```sh
@@ -275,16 +254,6 @@ git clean -df
275254
git branch -m <new-branch-name>
276255
```
277256

278-
## rebases 'feature' to 'master' and merges it in to master
279-
```sh
280-
git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}
281-
```
282-
283-
## Archive the `master` branch
284-
```sh
285-
git archive master --format=zip --output=master.zip
286-
```
287-
288257
## Modify previous commit without modifying the commit message
289258
```sh
290259
git add --all && git commit --amend --no-edit
@@ -402,7 +371,7 @@ git checkout <commit-ish> -- <file_path>
402371
git config --global branch.autosetuprebase always
403372
```
404373

405-
## List all the alias and configs.
374+
## 展示所有alias和configs.
406375
```sh
407376
git config --list
408377
```
@@ -417,11 +386,6 @@ git config --global core.ignorecase false
417386
git config --global core.editor '$EDITOR'
418387
```
419388

420-
## Auto correct typos.
421-
```sh
422-
git config --global help.autocorrect 1
423-
```
424-
425389
## Check if the change was a part of a release.
426390
```sh
427391
git name-rev --name-only <SHA-1>

0 commit comments

Comments
 (0)