33
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git statusで出るUntracked filesを削除する方法

Posted at

まず、「git status」でUntracked filesを確認

zsh
% git status
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	xxx/xxx
	yyy/yyy

「git clean」に「nオプション」を付け、削除するUntracked filesを確認

zsh
% git clean -n 
Would remove xxx/xxx
Would remove yyy/yyy

「git clean」に「fオプション」を付け、Untracked filesを削除

zsh
% git clean -f
Removing xxx/xxx
Removing yyy/yyy
33
26
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
33
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?