mirror of
https://github.com/namibia/tips.git
synced 2025-01-23 07:08:27 +00:00
get list of untracked files/directory
This commit is contained in:
parent
fd7f20a395
commit
d74c78a473
10
README.md
10
README.md
@ -44,8 +44,9 @@
|
|||||||
* [Show all ignored files](https://github.com/git-tips/tips#show-all-ignored-files)
|
* [Show all ignored files](https://github.com/git-tips/tips#show-all-ignored-files)
|
||||||
* [Create new working tree from a repository (git 2.5)](https://github.com/git-tips/tips#create-new-working-tree-from-a-repository-git-25)
|
* [Create new working tree from a repository (git 2.5)](https://github.com/git-tips/tips#create-new-working-tree-from-a-repository-git-25)
|
||||||
* [Create new working tree from HEAD state](https://github.com/git-tips/tips#create-new-working-tree-from-head-state)
|
* [Create new working tree from HEAD state](https://github.com/git-tips/tips#create-new-working-tree-from-head-state)
|
||||||
|
* [Before deleting untracked files/directory, do a dry run to get the list of untracked files/directory](https://github.com/git-tips/tips#before-deleting-untracked-filesdirectory-do-a-dry-run-to-get-the-list-of-untracked-filesdirectory)
|
||||||
* [Forcefully remove untracked files](https://github.com/git-tips/tips#forcefully-remove-untracked-files)
|
* [Forcefully remove untracked files](https://github.com/git-tips/tips#forcefully-remove-untracked-files)
|
||||||
* [Forcefully remove unstracted directory](https://github.com/git-tips/tips#forcefully-remove-unstracted-directory)
|
* [Forcefully remove untracked directory](https://github.com/git-tips/tips#forcefully-remove-untracked-directory)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
@ -301,12 +302,17 @@ git worktree add -b <branch-name> <path> <start-point>
|
|||||||
git worktree add --detach <path> HEAD
|
git worktree add --detach <path> HEAD
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Before deleting untracked files/directory, do a dry run to get the list of untracked files/directory
|
||||||
|
```sh
|
||||||
|
git clean -n
|
||||||
|
```
|
||||||
|
|
||||||
## Forcefully remove untracked files
|
## Forcefully remove untracked files
|
||||||
```sh
|
```sh
|
||||||
git clean -f
|
git clean -f
|
||||||
```
|
```
|
||||||
|
|
||||||
## Forcefully remove unstracted directory
|
## Forcefully remove untracked directory
|
||||||
```sh
|
```sh
|
||||||
git clean -f -d
|
git clean -f -d
|
||||||
```
|
```
|
||||||
|
@ -170,12 +170,16 @@
|
|||||||
"title": "Create new working tree from HEAD state",
|
"title": "Create new working tree from HEAD state",
|
||||||
"tip": "git worktree add --detach <path> HEAD"
|
"tip": "git worktree add --detach <path> HEAD"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "Before deleting untracked files/directory, do a dry run to get the list of untracked files/directory",
|
||||||
|
"tip": "git clean -n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "Forcefully remove untracked files",
|
"title": "Forcefully remove untracked files",
|
||||||
"tip": "git clean -f"
|
"tip": "git clean -f"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Forcefully remove unstracted directory",
|
"title": "Forcefully remove untracked directory",
|
||||||
"tip": "git clean -f -d"
|
"tip": "git clean -f -d"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user