Skip to main content
ドキュメントには� �繁に更新が� えられ、その都度公開されています。本ページの翻訳はま� 未完成な部分があることをご了承く� さい。最新の情� �については、英語のドキュメンテーションをご参照く� さい。本ページの翻訳に問題がある� �合はこちらまでご連絡く� さい。

このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-06-03. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの改善、新機能のためには、最新バージョンのGitHub Enterpriseにアップグレードしてく� さい。 アップグレードに関する支援については、GitHub Enterprise supportに連絡してく� さい。

Deleting files in a repository

You can delete an individual file or an entire directory in your repository on GitHub Enterprise Server.

People with write permissions can delete files or directories in a repository.

About file and directory deletion

You can delete an individual file in your repository or an entire directory, including all the files in the directory.

If you try to delete a file or directory in a repository that you don’t have write permissions to, we'll fork the project to your personal account and help you send a pull request to the original repository after you commit your change. For more information, see "About pull requests."

If the file or directory you deleted contains sensitive data, the data will still be available in the repository's Git history. To completely remove the file from GitHub Enterprise Server, you must remove the file from your repository's history. For more information, see "Removing sensitive data from a repository."

Deleting a file

  1. Browse to the file in your repository that you want to delete.

  2. At the top of the file, click .

  3. ページの下部で、ファイルに対して行った変更を説明する短く分かりやすいコミットメッセージを入力してく� さい。 コミットメッセージでは、複数の作者にコミットを関連づけることができます。 詳しい情� �については「複数の共作者を持つコミットの作成」を参照してく� さい。 変更のコミットメッセージ

  4. コミットメッセージフィールドの下で、コミットを追� を現在のブランチか新しいブランチから選択してく� さい。 現在のブランチがデフォルトブランチなら、コミット用に新しいブランチを作成してからPull Requestを作成すべきです。 詳しい情� �については「新しいプルリクエストの作成」を参照してく� さい。 コミットブランチのオプション

  5. [Propose file change] をクリックします。 ファイル変更の提案ボタン

Deleting a directory

  1. Browse to the directory in your repository that you want to delete.

  2. In the top-right corner, click , then click Delete directory. Button to delete a directory

  3. Review the files you will delete.

  4. ページの下部で、ファイルに対して行った変更を説明する短く分かりやすいコミットメッセージを入力してく� さい。 コミットメッセージでは、複数の作者にコミットを関連づけることができます。 詳しい情� �については「複数の共作者を持つコミットの作成」を参照してく� さい。 変更のコミットメッセージ

  5. コミットメッセージフィールドの下で、コミットを追� を現在のブランチか新しいブランチから選択してく� さい。 現在のブランチがデフォルトブランチなら、コミット用に新しいブランチを作成してからPull Requestを作成すべきです。 詳しい情� �については「新しいプルリクエストの作成」を参照してく� さい。 コミットブランチのオプション

  6. [Propose file change] をクリックします。 ファイル変更の提案ボタン