Skip to main content

このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-10-12. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise にアップグレードします。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせく� さい

Configuring commit squashing for pull requests

You can enforce, allow, or disable commit squashing for all pull request merges on your GitHub Enterprise Server instance in your repository.

You can configure pull request merge options on your GitHub Enterprise Server instance to meet your workflow needs and preferences for managing Git history. For more information, see "Configuring pull request merges."

スカッシュ マージの既定のコミット メッセージの詳細については、「pull request のマージについて」を参照してく� さい。

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. リポジトリ名の下の [ 設定] をクリックします。 リポジトリの設定ボタン

  3. Under "Merge button", select Allow squash merging. This allows contributors to merge a pull request by squashing all commits into a single commit. The default commit message presented to contributors when merging is the commit title and message if the pull request contains only 1 commit, or the pull request title and list of commits if the pull request contains 2 or more commits.

    Pull request squashed commits

If you select more than one merge method, collaborators can choose which type of merge commit to use when they merge a pull request. コミットの線形履歴を必要とする保護されたブランチ ルールがリポジトリにある� �合、スカッシュ マージ、リベース マージ、あるいはその両方を許可しなければなりません。 詳細については、「保護されたブランチについて」を参照してく� さい。

Further reading