![]() ![]() If you plan to continue work on the head branch of a pull request after the pull request is merged, we recommend you don't squash and merge the pull request. Squashing and merging a long-running branch For more information, see " Configuring commit squashing for pull requests". People with maintainer or admin access to a repository can configure their repository's default merge message for all squashed commits to use the pull request title, the pull request title and commit details, or the pull request title and description. The pull request title, followed by the pull request numberĪ list of the commit messages for all of the squashed commits, in date order The body text of the commit message for the single commit The title of the commit message for the single commit, followed by the pull request number Depending on how the repository is configured and the number of commits in the pull request, not including merge commits, this message may include the pull request title, pull request description, or information about the commits. ![]() When you squash and merge, GitHub generates a default commit message, which you can edit. If you squash these commits into one commit while merging to the default branch, you can retain the original changes with a clear Git history. Work-in-progress commits are helpful when working on a feature branch, but they aren’t necessarily important to retain in the Git history. You can use squash and merge to create a more streamlined Git history in your repository. To squash and merge pull requests, you must have write permissions in the repository, and the repository must allow squash merging. Pull requests with squashed commits are merged using the fast-forward option. Instead of seeing all of a contributor's individual commits from a topic branch, the commits are combined into one commit and merged into the default branch. When you select the Squash and merge option on a pull request on, the pull request's commits are squashed into a single commit. ![]() To merge pull requests, you must have write permissions in the repository. The pull request is merged using the -no-ff option. When you click the default Merge pull request option on a pull request on, all commits from the feature branch are added to the base branch in a merge commit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |